DirectX SDK

CONST_DPSESSIONFLAGS

Members of the CONST_DPSESSIONFLAGS enumeration are used to describe the characteristics of a session.

Enum CONST_DPSESSIONFLAGS
    DPSESSION_CLIENTSERVER       = 4096 (&H1000)
    DPSESSION_DIRECTPLAYPROTOCOL = 8192 (&H2000)
    DPSESSION_JOINDISABLED         = 32 (&H20)
    DPSESSION_KEEPALIVE            = 64 (&H40)
    DPSESSION_MIGRATEHOST           = 4
    DPSESSION_MULTICASTSERVER    = 2048 (&H800)
    DPSESSION_NEWPLAYERSDISABLED    = 1
    DPSESSION_NODATAMESSAGES      = 128 (&H80)
    DPSESSION_NOMESSAGEID           = 8
    DPSESSION_NOPRESERVEORDER   = 16384 (&H4000)
    DPSESSION_OPTIMIZELATENCY   = 32768 (&H8000)
    DPSESSION_PASSWORDREQUIRED   = 1024 (&H400)
    DPSESSION_PRIVATE             = 512 (&H200)
    DPSESSION_SECURESERVER        = 256 (&H100)
End Enum
DPSESSION_CLIENTSERVER
This is a client/server session that is being hosted by an application-server process. This flag must be specified at the time the session is created. Any clients that join this session will only be able to enumerate the server player and any local players. The host of the session will see all the players. If this flag is not set, the session is a peer-to-peer session. If this flag is set, the host can only create a server player. This flag cannot be used with DPSESSION_MIGRATEHOST.
DPSESSION_DIRECTPLAYPROTOCOL
This session should use the DirectPlay guaranteed protocol instead of the one implemented by the service provider. Use this flag if message throttling is desired (and you want the performance gains it provides).
DPSESSION_JOINDISABLED
No new applications can join this session. Any call to the DirectPlay4.Open method with the DPOPEN_JOIN flag and the globally unique identifier (GUID) of this session instance will cause an error. If this flag is not specified, new remote applications can join the session until the session player limit is reached.
DPSESSION_KEEPALIVE
This session will automatically detect when remote players drop out of the game abnormally. Those players will be deleted from the session. If a temporary network outage caused the loss of the players, they will be informed by a DPSYS_SESSIONLOST system message when they return that they were dropped from the session. This flag must be specified at the time the session is created. If this flag is not specified, DirectPlay will not automatically keep the session alive if players are abnormally terminated.
DPSESSION_MIGRATEHOST
If the current host exits, another computer in the session will become the host. The players on the new host computer will receive a DPSYS_HOST system message. This flag must be specified at the time the session is created. If this flag is not specified, the host will not migrate, new computers cannot join the session, and new players cannot be created if the current host leaves. Note that the DPSESSION_MIGRATEHOST flag cannot be combined with the DPSESSION_CLIENTSERVER, DPSESSION_MULTICASTSERVER, or DPSESSION_SECURESERVER flags.
DPSESSION_MULTICASTSERVER
In a peer-to-peer session, broadcast and group messages are routed through the host that acts like a multicast server. This flag must be specified at the time the session is created. The flag is only useful if the host has a high bandwidth connection to the network. If this flag is not specified, broadcast and group messages are sent directly between peers. This flag cannot be used with DPSESSION_MIGRATEHOST.
DPSESSION_NEWPLAYERSDISABLED
New players cannot be created in the session. Any call to the DirectPlay4.CreatePlayer method by an application in the session will result in an error. Also, new applications cannot join the session. If this flag is not specified, players can be created until the session player limit is reached.
DPSESSION_NODATAMESSAGES
The session does not send system messages when remote player data, group data, or session data is changed by the DirectPlay4.SetPlayerData, DirectPlay4.SetGroupData, DirectPlay4.SetPlayerName, DirectPlay4.SetGroupName, or DirectPlay4.SetSessionDesc method. If this flag is not specified, messages will be generated that indicate that the data changed.

Note that setting this flag also suppresses the DPSYS_SETSESSIONDESC system message.

DPSESSION_NOMESSAGEID
Specifies that the session does not attach data to messages that indicate which player the message is from and to whom it is sent. Setting this flag saves message overhead if this information is not relevant. If this flag is not specified, the message ID will be added. This flag must be specified at the time the session is created.
DPSESSION_NOPRESERVEORDER
Specifies that this session does not preserve the order in which guaranteed messages are received. By default, the receive order of guaranteed messages is preserved. If the order is not needed, this flag can be used to eliminate possible delays in delivery.
DPSESSION_OPTIMIZELATENCY
Asks the service provider to optimize for latency (which turns off nagling in TCP/IP). The default is to optimize for bandwidth.
DPSESSION_PASSWORDREQUIRED
Specifies that this session is password-protected. Any applications wishing to join the session must supply the password in the DirectPlay4.Open call. This is a read-only flag. It will be set automatically by DirectPlay when the host of the session specifies a password.
DPSESSION_PRIVATE
Specifies that this is a private session. It cannot respond to enumeration requests unless the request contains a non-NULL, matching password. If this flag is not specified, the session will respond to enumeration requests.
DPSESSION_SECURESERVER
Specifies that this session is being hosted on a secure server that will require authentication credentials before it can be opened. The host must specify this flag when the session is created. It cannot be changed later through DirectPlay4.SetSessionDesc. This flag cannot be combined with the DPSESSION_MIGRATEHOST flag.

Remarks

The following flags cannot be changed once the session has started:

DPSESSION_CLIENTSERVER
DPSESSION_DIRECTPLAYPROTOCOL
DPSESSION_KEEPALIVE
DPSESSION_MIGRATEHOST
DPSESSION_MULTICASTSERVER
DPSESSION_NOMESSAGEID
DPSESSION_OPTIMIZELATENCY
DPSESSION_SECURESERVER

The following flags can be set by using DirectPlay4.SetSessionDesc, but only by the host:

DPSESSION_JOINDISABLED
DPSESSION_NEWPLAYERSDISABLED
DPSESSION_NODATAMESSAGES
DPSESSION_NOPRESERVEORDER
DPSESSION_PASSWORDREQUIRED
DPSESSION_PRIVATE