peerStartReportingWithSocket

GameSpy SDK

peerStartReportingWithSocket

Begin server reporting using an externally managed socket.

PEERBool peerStartReportingWithSocket(
PEER peer,
SOCKET socket,
unsigned short port );
RoutineRequired HeaderDistribution
peerStartReportingWithSocket<peer.h>SDKZIP

Return Value

Returns PEERTrue if reporting was successfully started.

Parameters

peer
[in] Initialized peer object.
socket
[in] SOCKET to be used for reporting.
port
[in] Local port that the socket is bound to.

Remarks

The peerStartReporting function starts server reporting, without ever creating a staging room. This would be used if the application needs to start reporting itself as a server without any staging room attached. Call peerStopGame() when done to stop reporting.
If peerStartReportingWithSocket is used, the socket provided must be an already created UDP socket. It will be used for sending out query replies, and any queries the application reads off of the socket must be passed to Peer using peerParseQuery(). This can be useful when running a game host behind a NAT proxy -- for a full explanation of how this helps, see the "NAT and Firewall Support" appendix in the "GameSpy Query and Reporting 2 SDK" documentation.
A title must be set for this function to succeed, but Peer does not need to be connected. Also, this function cannot be called while already in a staging room.

Section Reference: Gamespy Peer SDK