2.2.1 EnumQuery
The EnumQuery message is used to query for instances of a DirectPlay Server/Host that is hosting a game session.
The size of the variable length field in the EnumQuery message is limited by whatever limit is placed on the overall message size by the DirectPlay 8 Service Provider that is used to transmit the message.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LeadByte |
CommandByte |
EnumPayload |
|||||||||||||||||||||||||||||
QueryType |
ApplicationGUID (16 bytes, optional) |
||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
ApplicationPayload (variable) |
||||||||||||||||||||||||||||||
... |
LeadByte (1 byte): This field is 8 bits in length. It MUST be 0x00.
-
Note The first byte MUST be 0 for the message to be a valid EnumQuery message. When a message is received and the first byte is nonzero, the entire message MUST be passed through for processing as described in [MC-DPL8R].
CommandByte (1 byte): This field is 8 bits in length. It MUST be 0x02.
EnumPayload (2 bytes): This field is 16 bits in length. The EnumPayload is a value selected by the sender of the EnumQuery message that can be used to match EnumResponse messages to their corresponding EnumQuery.
QueryType (1 byte): This field is 8 bits in length.
-
Value
Meaning
0x02
Indicates that this EnumQuery message contains no ApplicationGUID field. All DirectPlay Servers/Hosts that receive this EnumQuery message in valid form SHOULD respond to it.
0x01
Indicates that this query contains an ApplicationGUID field. Only DirectPlay Servers/Hosts that are identified by the ApplicationGUID SHOULD respond to this EnumQuery message, if it is valid. For more information about the GUID type, see [MS-DTYP] section 2.3.4.
ApplicationGUID (16 bytes): The Application GUID. This optional field, when present, is 128 bits in length.
ApplicationPayload (variable): This variable-length optional field, when present, MUST be a multiple of 8 bits in length. Note that the receiver is expected to discover the size of the ApplicationPayload field by examining the total size of the message delivered by the underlying DirectPlay 8 Service Provider, because this is the only variable-length field in this message. No explicit-size field is provided. The contents of this field are application-specific and allow the DirectPlay Client/Peer to send additional application-specific information to the DirectPlay Server/Host. The server application can then use the information to decide if it will reply to the EnumQuery, and/or determine what additional information, if any, it SHOULD return in the EnumResponse message.