DirectX SDK

DirectPlay Protocol

The DirectPlay protocol is an implementation of guaranteed messaging on nonguaranteed service providers. For example, the Internetwork Packet Exchange (IPX) service provider does not inherently support guaranteed messaging. When an application tries to send a guaranteed message on IPX, the DirectPlay protocol will take care of doing all the handshaking necessary to guarantee delivery of the message.

The DirectPlay protocol also implements asynchronous messaging and message throttling, although the service provider may optimize this functionality.

An application invokes the DirectPlay protocol by setting the DPSESSION_DIRECTPLAYPROTOCOL flag when creating a session.

System messages are always sent guaranteed, whether or not the service provider natively supports guaranteed messages, and whether or not you set the DirectPlay protocol flag. The DirectPlay protocol will be used automatically to send system messages guaranteed.

[C++]

For non-system messages, if an application sets the DirectPlay protocol flag and sends a message guaranteed (by setting the DPSEND_GUARANTEED flag in IDirectPlay4::SendEx), the message will be sent guaranteed whether the service provider supports guaranteed messages or not.

[Visual Basic]

For non-system messages, if an application sets the DirectPlay protocol flag and sends a message guaranteed (by setting the DPSEND_GUARANTEED flag in DirectPlay4.SendEx), the message will be sent guaranteed whether the service provider supports guaranteed messages or not.

If an application does not set the DirectPlay protocol flag and sends a message guaranteed, delivery will be guaranteed only if the service provider supports it, regardless of the DPSEND_GUARANTEED flag.

An application also can also specify that the DirectPlay protocol be used instead of the default guaranteed messaging implemented by the service provider. This is also done by specifying the DPSESSION_DIRECTPLAYPROTOCOL flag when creating a session.

The following table summarizes how non-system messages are sent.

If the DirectPlay protocol flag is not set:

Service Provider Messages Sent Guaranteed Use: Messages Sent Nonguaranteed Use:
IPX IPX, won't be sent guaranteed IPX
TCP/IP TCP UDP
Modem Modem, won't be sent guaranteed Modem

If the DirectPlay protocol flag is set:

Service Provider Messages Sent Guaranteed Use: Messages Sent Nonguaranteed Use:
IPX DirectPlayProtocol/IPX DirectPlayProtocol/IPX
TCP/IP DirectPlayProtocol/UDP DirectPlayProtocol/UDP
Modem DirectPlayProtocol/Modem DirectPlayProtocol/Modem

When the DirectPlay protocol flag is not set, the application must examine the capabilities of the service provider (after the session has been opened) to determine what functionality is available in terms of asynchronous messaging, canceling messages, timeouts on messages, and prioritization of messages. If the DirectPlay protocol flag is set, all this functionality is available.