ServerBrowserSendMessageToServer

GameSpy SDK

ServerBrowserSendMessageToServer

Sends a game specific message to the specified IP/port. This message is routed through the master server.

SBError ServerBrowserSendMessageToServer(
ServerBrowser sb,
const gsi_char * ip,
unsigned short port,
const char * data,
int len );
RoutineRequired HeaderDistribution
ServerBrowserSendMessageToServer<sb_serverbrowsing.h>SDKZIP

Return Value

If an error occurs, a valid SBError error code is returned. Otherwise, sbe_noerror is returned.

Parameters

sb
[in] ServerBrowser object intialized with ServerBrowserNew.
ip
[in] Address of the server in string form. "xxx.xxx.xxx.xxx"
port
[in] The query port of the server to send the message to, in network byte order.
data
[in] The raw data buffer.
len
[in] The length of the data buffer.

Remarks

The ServerBrowserSendMessageToServer function can be used to relay a raw data buffer to a server behind a firewall. The raw buffer is sent through the backend since direct communication with the server is not always possible. The buffer is sent in raw form to the server’s query port and does not contain any header information. This message is most usefull in a shared socket QR2 implementation.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
ServerBrowserSendMessageToServerServerBrowserSendMessageToServerAServerBrowserSendMessageToServerW

ServerBrowserSendMessageToServerW and ServerBrowserSendMessageToServerA are UNICODE and ANSI mapped versions of ServerBrowserSendMessageToServer. The arguments of ServerBrowserSendMessageToServerA are ANSI strings; those of ServerBrowserSendMessageToServerW are wide-character strings.