2.2.5 DPSESSIONDESC2

The DPSESSIONDESC2 structure contains game session-related information. A game session is an instance of a game.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Size

Flags

InstanceGUID (16 bytes)

...

...

ApplicationGUID (16 bytes)

...

...

MaxPlayers

CurrentPlayerCount

SessionName

Password

Reserved1

Reserved2

ApplicationDefined1

ApplicationDefined2

ApplicationDefined3

ApplicationDefined4

Size (4 bytes): MUST be set to the size of the structure, in octets.

Flags (4 bytes): Game session flags. Game session flags are set by the game and allow the game to specify semantics for the DirectPlay 4 protocol.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

N

P

X

M

H

N

M

I

J

D

K

A

N

D

S

S

P

P

R

M

S

C

S

R

P

N

O

O

L

A

V

N

S

Y

NP (1 bit): Applications cannot create new players in this game session, as specified in section 3.2.5.4.

X (1 bit): All bits with this label SHOULD be set to zero when sent and MUST be ignored on receipt.

MH (1 bit): When the game host quits, the game host responsibilities migrate to another DirectPlay machine so that new players can continue to be created and nascent game instances can join the game session, as specified in section 3.1.6.2.

NM (1 bit): DirectPlay will not set the PlayerTo and PlayerFrom fields in player messages.

I (1 bit): (Ignored). All bits with this label MUST be ignored on receipt.

JD (1 bit): DirectPlay will not allow any new applications to join the game session. Applications already in the game session can still create new players, as specified in section 3.2.5.4.

KA (1 bit): DirectPlay will detect when remote players exit abnormally (for example, because their computer or modem was unplugged) through the use of the Ping Timer, as described in sections 3.1.2.5 and 3.2.2.2.

ND (1 bit): DirectPlay will not send a message to all players when a player's remote data changes.

SS (1 bit): Instructs the game session establishment logic to use user authentication as specified in sections 3.1.5.1 and 3.2.5.7.

P (1 bit): Indicates that the game session is private and requires a password for EnumSessions as well as Open.

PR (1 bit): Indicates that the game session requires a password to join.

MS (1 bit): DirectPlay will route all messages through the game host, as specified in section 3.1.5.1.

CS (1 bit): DirectPlay will download information about the DPPLAYER_SERVERPLAYER only.

RP (1 bit): Instructs the DirectPlay client to always use DirectPlay 4 Reliable Protocol [MC-DPL4R]. When this bit is set, only other game sessions with the same bit set can join or be joined.

NO (1 bit): Instructs the DirectPlay client that, when using reliable delivery, preserving the order of received packets is not important. This allows messages to be indicated out of order if preceding messages have not yet arrived. If this flag is not set, DirectPlay waits for earlier messages to arrive before delivering later reliable messages.

OL (1 bit): DirectPlay will optimize communication for latency. Implementations SHOULD use the presence of the OL flag for guidance on how to send or process messages to optimize for latency rather than throughput; however, implementations can choose to ignore this flag. The presence or absence of the OL flag MUST NOT affect the sequence or binary contents of DirectPlay 4 protocol messages.<6>

AV (1 bit): Allows lobby-launched games that are not voice-enabled to acquire voice capabilities.

NS (1 bit): Suppresses transmission of game session description changes.

Y (14 bits): All bits with this label SHOULD be set to zero when sent and MUST be ignored on receipt.

InstanceGUID (16 bytes): Identifier for the game session instance.

ApplicationGUID (16 bytes): MUST be set to the unique identifier of the DirectPlay game.

MaxPlayers (4 bytes): Maximum number of players allowed in the game session.

CurrentPlayerCount (4 bytes): Current number of players in the game session.

SessionName (4 bytes): Placeholder for a pointer to a Unicode string that contains the game session name and the NULL terminating character. This field SHOULD be set to zero when sent and MUST be ignored on receipt.<7>

Password (4 bytes): Placeholder for a pointer to a Unicode string that contains the game session password and the NULL terminating character. This field SHOULD be set to zero when sent and MUST be ignored on receipt.<8>

Note A secure game session is different from a password protected game session. DirectPlay 4 allows for securing access to a game session with a user-specified cleartext password that is specified by the host and which MUST be provided by all clients. Although not very secure, this form of security provides a very lightweight alternative that does not require user accounts and associated management. It is used to casually restrict access to a particular instance of a game session.

Reserved1 (4 bytes): MUST be set to a unique value that is used to construct the player and group ID values. For more information about how this value is used to construct player and group identifiers, see section 3.2.5.4.

Reserved2 (4 bytes): Reserved for future use.

ApplicationDefined1 (4 bytes): For use by the DirectPlay game.

ApplicationDefined2 (4 bytes): For use by the DirectPlay game.

ApplicationDefined3 (4 bytes): For use by the DirectPlay game.

ApplicationDefined4 (4 bytes): For use by the DirectPlay game.