Drag[en]gine Game Engine  1.0
deServer Class Reference

Network Server Class. More...

#include <deServer.h>

Inheritance diagram for deServer:
deResource deObject

Public Member Functions

Management
const char * GetAddress () const
 
void SetAddress (const char *address)
 
bool ListenOn (const char *address)
 
void StopListening ()
 
System Peers
deBaseNetworkServerGetNetworkServer () const
 
void SetNetworkServer (deBaseNetworkServer *netServer)
 
deBaseScriptingServerGetScriptingServer () const
 
void SetScriptingServer (deBaseScriptingServer *scrServer)
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deServer (deServerManager *manager)
 
virtual ~deServer ()
 Clean up server object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Network Server Class.

Manages a server for a network game. The server is a connection point for players connecting to a network game. Every server listens on one address. For connecting players a new connection object is created handling the communication.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deServer()

deServer::deServer ( deServerManager manager)

Creates a new server object.

◆ ~deServer()

virtual deServer::~deServer ( )
protectedvirtual

Clean up server object.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ GetAddress()

const char* deServer::GetAddress ( ) const
inline

Retrieves the address.

References ListenOn(), SetAddress(), and StopListening().

◆ GetNetworkServer()

deBaseNetworkServer* deServer::GetNetworkServer ( ) const
inline

Retrieves the network system peer object.

References SetNetworkServer().

◆ GetScriptingServer()

deBaseScriptingServer* deServer::GetScriptingServer ( ) const
inline

Retrieves the scripting system peer object.

References SetScriptingServer().

◆ ListenOn()

bool deServer::ListenOn ( const char *  address)

Starts listening on the given address for incoming connections. The format of the address is specific to the network module. Returns true if listening or false if something went wrong.

Referenced by GetAddress().

◆ SetAddress()

void deServer::SetAddress ( const char *  address)

Sets the address. Intended to be used by the network module only so do not call it otherwise.

Referenced by GetAddress().

◆ SetNetworkServer()

void deServer::SetNetworkServer ( deBaseNetworkServer netServer)

Sets the network system peer object.

Referenced by GetNetworkServer().

◆ SetScriptingServer()

void deServer::SetScriptingServer ( deBaseScriptingServer scrServer)

Sets the scripting system peer object.

Referenced by GetScriptingServer().

◆ StopListening()

void deServer::StopListening ( )

Stops listening.

Referenced by GetAddress().


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