gt2ReceiveFilterCallback
Callback for filtering incoming data.
- typedef void (*gt2ReceiveFilterCallback)(
- GT2Connection connection,
- int filterID,
- GT2Byte * message,
- int len,
- GT2Bool reliable );
Routine | Required Header | Distribution |
---|---|---|
gt2ReceiveFilterCallback | <gt2.h> | SDKZIP |
Parameters
- connection
- [in] The handle to the connection.
- filterID
- [in] Pass this ID to gtFilteredReceive.
- message
- [in] The message that was received. Will be NULL if an empty message.
- len
- [in] The length of the message in bytes. Will be 0 if an empty message.
- reliable
- [in] True if this is a reliable message.
Remarks
Call gt2FilteredRecieve with the filtered data, either from within the callback or later.
The message may point to a memory location supplied to gt2FilteredReceive by a previous filter, so if this filter's call to gt2FilteredReceive is delayed, it is the filter's responsibility to make sure the data is still around when and if it is needed.
Section Reference: Gamespy Transport SDK
See Also: gt2AddReceiveFilter, gt2RemoveReceiveFilter, gt2FilteredReceive