gt2DumpCallback
Called whenever data is sent or received over a socket.
- typedef void (*gt2DumpCallback)(
- GT2Socket socket,
- GT2Connection connection,
- unsigned long ip,
- unsigned short port,
- GT2Bool reset,
- const GT2Byte * message,
- int len );
Routine | Required Header | Distribution |
---|---|---|
gt2DumpCallback | <gt2.h> | SDKZIP |
Parameters
- socket
- [in] The handle to the socket.
- connection
- [in] The handle to the connection associated with this message, or NULL if there is no connection for this message.
- ip
- [in] The remote IP address, in network byte order.
- port
- [in] The remote host, in host byte order.
- reset
- [in] If true, the connection has been reset (only used by the receive callback).
- message
- [in] The message (should not be modified).
- len
- [in] The length of the message.
Remarks
Trying to send a message from within the send dump callback, or letting the socket think from within the receive dump callback can cause serious problems, and should not be done.
Section Reference: Gamespy Transport SDK
See Also: gt2SetSendDump, gt2SetReceiveDump