1.3 Overview
The DirectPlay 8 Protocol: Host and Port Enumeration enables a DirectPlay Client/Peer to discover DirectPlay Servers/Hosts.
The basic functionality is simple. A DirectPlay Client/Peer sends an EnumQuery message over a communications network. If the EnumQuery message is received by a DirectPlay Server/Host, and the DirectPlay Server/Host looks to enable the DirectPlay Client/Peer to connect to the game session that it is hosting, it replies to the DirectPlay Client/Peer with an EnumResponse message. The EnumResponse message contains the information required by the DirectPlay Client/Peer to attempt to connect to the game session being hosted by the DirectPlay Server/Host.
Note that it is possible for one EnumQuery message to be delivered to multiple DirectPlay Servers/Hosts, each of which might or might not reply with an EnumResponse message. Therefore, one EnumQuery message can generate zero, one, or more than one EnumResponse messages. The DirectPlay Client/Peer is not obligated to connect to any of the DirectPlay Servers/Hosts that reply with an EnumResponse message. On the contrary, one of the purposes of the DirectPlay 8 Protocol: Host and Port Enumeration process is to allow a DirectPlay Client/Peer to discover multiple game sessions and to choose which one to join based on application-specific preferences, such as game modes, latency, number of players, user preferences, and so on.
The EnumQuery and EnumResponse messages are delivered using the User Datagram Protocol (UDP) [RFC768] or a similar datagram-oriented, connectionless protocol. As a result, both EnumQuery and EnumResponse messages can be lost. It is therefore expected that a DirectPlay Client/Peer will send multiple EnumQuery requests while searching for available DirectPlay Servers/Hosts.
It is possible, although not required, for the DirectPlay Client/Peer to note the round-trip latency of each EnumQuery/EnumResponse pair, and the number of EnumQuery/EnumResponse pairs that are lost, and use that information to predict the future quality of the network service between itself and the responding DirectPlay Servers/Hosts.