gt2ConnectedCallback
This callback is called when a connection attempt with gt2Connect finishes.
- typedef void (*gt2ConnectedCallback)(
- GT2Connection connection,
- GT2Result result,
- GT2Byte * message,
- int len );
Routine | Required Header | Distribution |
---|---|---|
gt2ConnectedCallback | <gt2.h> | SDKZIP |
Parameters
- connection
- [in] The handle to the connection.
- result
- [in] The result of the connection attempt. Anything aside from GT2Success indicates failure.
- message
- [in] If result is GT2Rejected, this is the rejection message. May be NULL.
- len
- [in] If result is GT2Rejected, the length of message. May be 0.
Remarks
If result is GT2Success, then this connection attempt succeeded. The connection object can now be used for sending/receiving messages. Any other result indicates connection failure, and the connection object cannot be used again after this callback returns. If the result is GT2Rejected, then message contains an optional rejection message sent by the listener. If result is not GT2Rejected, then message will be NULL and len will be 0.
Section Reference: Gamespy Transport SDK
See Also: gt2Connect