gt2SetUnrecognizedMessageCallback
Used to handle unrecognized messages, usually used for sharing a socket with another SDK.
- void gt2SetUnrecognizedMessageCallback(
- GT2Socket socket,
- gt2UnrecognizedMessageCallback callback );
Routine | Required Header | Distribution |
---|---|---|
gt2SetUnrecognizedMessageCallback | <gt2.h> | SDKZIP |
Parameters
- socket
- [in] The handle to the socket.
- callback
- [in] Function to be called when an unrecognized message is received.
Remarks
This is used to set a callback to be called everytime a socket receives a message that it cannot match up to an existing connection. If a GT2Socket object’s underlying socket is being shared, this allows an application to check for data that was not meant for GT2. If the callback parameter is NULL, then any previously set callback will be removed.
This is typically used when you are sharing a GT2Socket with another SDK, such as QR2 or NAT Negotiation. Setting an unrecognized callback allows you to pass messages meant for another SDK to the appropriate place.
Section Reference: Gamespy Transport SDK
See Also: gt2UnrecognizedMessageCallback, gt2GetSocketSOCKET