TNet 3  3.0.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
TNet.LobbyServerLink Class Reference

The game server cannot communicate directly with a lobby server because that server can be TCP or UDP based, and may also be hosted either locally or on another computer. And so we use a different class to "link" them together – the LobbyServerLink. This class will link a game server with a local lobby server. More...

Inheritance diagram for TNet.LobbyServerLink:
TNet.TcpLobbyServerLink TNet.UdpLobbyServerLink

Public Member Functions

 LobbyServerLink (LobbyServer lobbyServer)
 Create a new local lobby server link. Expects a local server to work with. More...
 
virtual void Start ()
 Start the lobby server link. Establish a connection, if one is required. More...
 
virtual void Stop ()
 Stopping the server should be delayed in order for it to be thread-safe. More...
 
virtual void SendUpdate (GameServer gameServer)
 Send an update to the lobby server. Triggered by the game server. More...
 

Protected Attributes

GameServer mGameServer
 
Thread mThread
 
IPEndPoint mInternal
 
IPEndPoint mExternal
 
volatile bool mShutdown = false
 

Properties

virtual bool isActive [get]
 Whether the link is currently active. More...
 

Detailed Description

The game server cannot communicate directly with a lobby server because that server can be TCP or UDP based, and may also be hosted either locally or on another computer. And so we use a different class to "link" them together – the LobbyServerLink. This class will link a game server with a local lobby server.

Constructor & Destructor Documentation

TNet.LobbyServerLink.LobbyServerLink ( LobbyServer  lobbyServer)

Create a new local lobby server link. Expects a local server to work with.

Member Function Documentation

virtual void TNet.LobbyServerLink.SendUpdate ( GameServer  gameServer)
virtual

Send an update to the lobby server. Triggered by the game server.

Reimplemented in TNet.UdpLobbyServerLink, and TNet.TcpLobbyServerLink.

virtual void TNet.LobbyServerLink.Start ( )
virtual

Start the lobby server link. Establish a connection, if one is required.

Reimplemented in TNet.UdpLobbyServerLink, and TNet.TcpLobbyServerLink.

virtual void TNet.LobbyServerLink.Stop ( )
virtual

Stopping the server should be delayed in order for it to be thread-safe.

Member Data Documentation

IPEndPoint TNet.LobbyServerLink.mExternal
protected
GameServer TNet.LobbyServerLink.mGameServer
protected
IPEndPoint TNet.LobbyServerLink.mInternal
protected
volatile bool TNet.LobbyServerLink.mShutdown = false
protected
Thread TNet.LobbyServerLink.mThread
protected

Property Documentation

virtual bool TNet.LobbyServerLink.isActive
get

Whether the link is currently active.


The documentation for this class was generated from the following file: