Main Page | Modules | File List | File Members

Lobby-Server functions

List of the Library's functions who manage the lobby-server connection and lobby-server requests. More...

Functions

GSbool RegServerSend_LobbyServerConnection (const GSchar *szAddress, GSushort usPort, GSushort usLocalPort=0, GSuint uiStillAliveDelay=25, GSuint uiDisconnectionDelay=120)
 Connect to the lobby-server.

GSbool RegServerSend_LobbyServerClose ()
 Close the lobby-server connection.

GSbool RegServerSend_LobbyServerLogin (const GSchar *szUsername, GSint iGroupID)
 Log on the lobby-server.

GSbool RegServerSend_UpdateGroupSettings (GSint iGroupID, GSbyte bOpen, GSbyte bScoreSubmission, GSbyte bDedicatedServer, GSint uiMaxPlayers, GSint uiMaxSpectator, const GSchar *szPassword, const GSvoid *pucGroupInfo, GSint iGroupInfoSize, const GSvoid *pucAltGroupInfo, GSint iAltGroupInfoSize, const GSvoid *pucGameData, GSint iGameDataSize, GSushort usGamePort)
 Modify group parameters.

GSbool RegServerSend_LobbyServerMemberJoin (const GSchar *szUsername)
 Send to the lobby-server than a player join the game server.

GSbool RegServerSend_LobbyServerMemberLeave (const GSchar *szUsername)
 Send to the lobby-server than a player left the game server.

GSbool RegServerSend_MatchStart (GSuint uiMode=0)
 Send to the lobby-server than the Server wants to start a match.

GSbool RegServerSend_MatchFinish ()
 Force The Lobby-Server to finish the match.


Detailed Description

List of the Library's functions who manage the lobby-server connection and router requests.

Function Documentation

GSbool RegServerSend_LobbyServerClose  ) 
 

Description:
Close the lobby-server connection.
Callbacks:
CBRegServerRcv_LobbyServerDisconnection
Returns:
The function succeed
Return values:
GS_TRUE 
GS_FALSE 

GSbool RegServerSend_LobbyServerConnection const GSchar *  szAddress,
GSushort  usPort,
GSushort  usLocalPort = 0,
GSuint  uiStillAliveDelay = 25,
GSuint  uiDisconnectionDelay = 120
 

Description:
Established a connection to a given lobby-server.
Returns:
The connection succeed
Return values:
GS_TRUE 
GS_FALSE 
Parameters:
szAddress The address of the lobby server
usPort The port of the lobbyserver
usLocalPort The Port for receiving data ( 0 for random fix )
uiStillAliveDelay The delay than a probe message is sent to keep alive the connection
uiDisconnectionDelay The delay that took to close the connection since no more messages are exchange.

GSbool RegServerSend_LobbyServerLogin const GSchar *  szUsername,
GSint  iGroupID
 

Description:
Sends the informations needed by the lobby-server to accomplish the registration.
Callbacks:
CBRegServerRcv_LobbyServerLogin
Returns:
The message was sent correctly
Return values:
GS_TRUE 
GS_FALSE 
Parameters:
szUsername The Ubi.com username
iGroupID The group ID of the resgisted group given by the router after a room register

GSbool RegServerSend_LobbyServerMemberJoin const GSchar *  szUsername  ) 
 

Description:
Send to the lobby-sever than a player joined game server.
Returns:
The message was sent correctly
Return values:
GS_TRUE the message was sent to the lobby-server
GS_FALSE the function was not able to send the message
Parameters:
szUsername The name of the player who was just joined

GSbool RegServerSend_LobbyServerMemberLeave const GSchar *  szUsername  ) 
 

Description:
Send to the lobby-sever than a player left or disconnected from the game server.
Returns:
The message was sent correctly
Return values:
GS_TRUE the message was sent to the lobby-server
GS_FALSE the library was not able to send the message
Parameters:
szUsername The name of the player who was just left

GSbool RegServerSend_MatchFinish  ) 
 

Description:
Force The Lobby-Server to finish the match. The match can be finished before than the server send a start match if all the members send a Player_Match_Finish to the lobby-server.
Returns:
The message was sent correctly.
Return values:
GS_TRUE the message was sent to the lobby-server
GS_FALSE the library was not able to send the message

GSbool RegServerSend_MatchStart GSuint  uiMode = 0  ) 
 

Description:
Send to the lobby-server than the Server wants to start a match.
Returns:
The message was sent correctly
Return values:
GS_TRUE the message was sent to the lobby-server
GS_FALSE the library was not able to send the message
Parameters:
uiMode The mode of the match as define for the score system ( ex. captuer the flag, Team dead match ... )

GSbool RegServerSend_UpdateGroupSettings GSint  iGroupID,
GSbyte  bOpen,
GSbyte  bScoreSubmission,
GSbyte  bDedicatedServer,
GSint  uiMaxPlayers,
GSint  uiMaxSpectator,
const GSchar *  szPassword,
const GSvoid *  pucGroupInfo,
GSint  iGroupInfoSize,
const GSvoid *  pucAltGroupInfo,
GSint  iAltGroupInfoSize,
const GSvoid *  pucGameData,
GSint  iGameDataSize,
GSushort  usGamePort
 

Description:
This function modifies the parameters a of a room. Modifiactions are done on a parameter only when the value is not the default value. Example: To Modify ONLY the number of allowed players to 8, you set the variable uiMaxPlayers and you set other variable to the default value.
Returns:
The message was sent correctly
Return values:
GS_TRUE the message was sent to the Lobbby Server
GS_FALSE the function was not able to send the message
Parameters:
iGroupID The ID of the Group
bOpen Close the acces to the group; close: 0, open: 1, Default Value: -1
bScoreSubmission Allow the score submission; dont't allow: 0, allow: 1, Default Value: -1
bDedicatedServer This room represent a Dedicated Server; not Dedicated Server: 0, Dedicated Server: 1, Default Value: -1
uiMaxPlayers The maximum player of the group, Default Value -1
uiMaxSpectator The maximum spectaor of the group, Default Value -1
szPassword The password of the group, Default Value NULL ( "" value remove the password )
pucGroupInfo The varible info of the group, Default Value NULL
iGroupInfoSize The buffer size of the info of the group, Default value -1
pucAltGroupInfo The varible alternate info of the group, Default value NULL
iAltGroupInfoSize The buffer size of the alternate info of the group, Default value -1
pucGameData The connection info to connect to the game, Default value NULL
iGameDataSize The buffer size of game info, Default value -1
usGamePort The Port of the Game Server needed by other client to connect to. Default Value 0


Ubi.com GameService SDK - ©UbiSoft Entertainment 2002
GameService development team