gt2SendFilterCallback

GameSpy SDK

gt2SendFilterCallback

Callback for filtering outgoing data.

typedef void (*gt2SendFilterCallback)(
GT2Connection connection,
int filterID,
const GT2Byte * message,
int len,
GT2Bool reliable );
RoutineRequired HeaderDistribution
gt2SendFilterCallback<gt2.h>SDKZIP

Parameters

connection
[in] The handle to the connection.
filterID
[in] Pass this ID to gt2FilteredSend.
message
[in] The message being sent. Will be NULL if an empty message.
len
[in] The length of the message being sent, in bytes. Will be 0 if an empty message.
reliable
[in] If the message is being sent reliably.

Remarks

Call gt2FilteredSend with the filtered data, either from within the callback or later.
The message points to the same memory location as the message passed to gt2Send (or gt2FilteredSend), so if the call to gt2FilteredSend is delayed, it is the filter's responsibility to make sure the data is still around when and if it is needed.