gt2UnrecognizedMessageCallback
This callback gets called when the sock receives a message that it cannot match to an existing connection.
- typedef GT2Bool (*gt2UnrecognizedMessageCallback)(
- GT2Socket socket,
- unsigned int ip,
- unsigned short port,
- GT2Byte * message,
- int len );
Routine | Required Header | Distribution |
---|---|---|
gt2UnrecognizedMessageCallback | <gt2.h> | SDKZIP |
Return Value
GT2True if the callback recognizes the message and handles it. GT2False if GT2 should handle the message.
Parameters
- socket
- [in] The handle to the socket.
- ip
- [in] The IP address of the remote machine the message came from (in network byte order).
- port
- [in] The port on the remote machine (in host byte order).
- message
- [in] The message (may be NULL for an empty message).
- len
- [in] The length of the message (may be 0).
Remarks
If the callback recognizes the message and handles it, it should return GT2True, which will tell the socket to ignore the message. If the callback does not recognize the message, it should return GT2False, which tells the socket to let the other side know there is no connection.
Section Reference: Gamespy Transport SDK
See Also: gt2SetUnrecognizedMessageCallback, gt2GetSocketSOCKET