2.2.19 DPSP_MSG_CHAT

The DPSP_MSG_CHAT packet is used to exchange text between players.


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

DPSP_MSG_HEADER

...

IDFrom

IDTo

Flags

MessageOffset

ChatMessage (variable)

...

DPSP_MSG_HEADER (8 bytes): Message header for this packet. It does not contain the size, token, and SockAddr fields. The Command Value member of this field MUST be set to 45 (0x2D).

IDFrom (4 bytes): MUST be set to the identifier of the sending player.

IDTo (4 bytes): MUST be set to the identifier of the destination player or group.

Flags (4 bytes): Chat flags. MUST be set to one of the following values.


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

G

S

X

GS (1 bit): If this bit is set, send the message using a guaranteed send method. If this bit is clear, send the message using a nonguaranteed send method.

Note Determining whether to send the message guaranteed can be inferred from the DPSP_MSG_HEADER and the transport method. Use of the GS flag is not required.

X (31 bits): Not used. SHOULD be set to zero when sent and MUST be ignored on receipt.

MessageOffset (4 bytes): MUST be set to the offset, in octets, from the beginning of the message to the ChatMessage field. Zero indicates a NULL message.

ChatMessage (variable): Null-terminated Unicode string that contains the contents of the chat message.