gt2DumpCallback

GameSpy SDK

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 );
RoutineRequired HeaderDistribution
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.