1.3 Overview

The DirectPlay DXDiag Usage Protocol is designed to handle the following two basic types of network messaging for networked gaming:

  • Reliable versus not reliable messaging: This determines whether or not messages are guaranteed to be delivered to the target application in the event of packet loss.

  • Sequential versus non-sequential messaging: This determines whether or not messages are received by the target application in the same order in which they are sent in the event of packet loss or incorrect ordering.

Games use messaging for a variety of purposes, each with different demands. To support the range of messaging requirements, the DirectPlay DXDiag Usage Protocol designates a message as belonging to one of four categories, depending on whether the message is reliable and/or sequential. The categories are specified by setting the PACKET_COMMAND_RELIABLE and PACKET_COMMAND_SEQUENTIAL flags in the bCommand field of the TRANS_USERDATA_HEADER packet header as follows:

Message category

Flags set

Reliable and Sequential

PACKET_COMMAND_RELIABLE and PACKET_COMMAND_SEQUENTIAL

Not reliable and Sequential

PACKET_COMMAND_SEQUENTIAL

Reliable and Non-sequential

PACKET_COMMAND_RELIABLE

Not reliable and Non-sequential

None

The DirectPlay DXDiag Usage Protocol enables optimizing of messaging strategy by assigning categories on a message-by-message basis.

Reliable packets are those that the upper layer considers important to retry when they are lost on the network. Packets not marked as reliable are for temporary messages that are not critical to operation and are not retried because they are replaced with subsequent messages. Sequential packets are those that have to be delivered according to the upper layer and have to wait until the gaps in the sequence due to packet loss are resolved. However, non-sequential packets can be delivered to the upper layer as they arrive.