TDME2 1.9.121
|
Base class for network server groups. More...
#include <tdme/network/udpserver/ServerGroup.h>
Public Types | |
typedef std::set< std::string > | ClientKeySet |
Public Member Functions | |
ServerGroup (const uint32_t groupId) | |
const string & | getKey () |
group identification key More... | |
const bool | setKey (const string &key) |
sets the group identification key More... | |
ClientKeySet | getClientKeySet () |
get a copy of current group client keys More... | |
virtual const bool | addClient (CLIENT *client) |
Adds a client to this group. More... | |
virtual const bool | removeClient (CLIENT *client) |
Removes a client from this group. More... | |
virtual void | shutdown ()=0 |
Shuts down this server group. More... | |
![]() | |
Reference () | |
Public constructor. More... | |
virtual | ~Reference () |
destructor More... | |
void | acquireReference () |
acquires a reference, incrementing the counter More... | |
void | releaseReference () |
releases a reference, thus decrementing the counter and delete it if reference counter is zero More... | |
virtual void | onDelete () |
Callback method to be overridden, will be called if object will be deleted. More... | |
Protected Types | |
typedef std::map< const std::string, CLIENT * > | ClientKeyMap |
Protected Member Functions | |
virtual void | onCreate ()=0 |
virtual void | onClose ()=0 |
virtual void | close () |
Shuts down this group. More... | |
![]() | |
virtual void | onInit ()=0 |
virtual void | onClose ()=0 |
virtual void | onCustomEvent (const string &type)=0 |
Protected Attributes | |
SERVER * | server |
uint32_t | groupId |
std::string | key |
ClientKeySet | clientKeySet |
ReadWriteLock | clientKeyListsReadWriteLock |
Base class for network server groups.
Definition at line 34 of file ServerGroup.h.
|
protected |
Definition at line 124 of file ServerGroup.h.
typedef std::set<std::string> ClientKeySet |
Definition at line 36 of file ServerGroup.h.
|
inline |
Definition at line 38 of file ServerGroup.h.
|
inlinevirtual |
|
inlineprotectedvirtual |
Shuts down this group.
Definition at line 139 of file ServerGroup.h.
|
inline |
get a copy of current group client keys
Definition at line 75 of file ServerGroup.h.
|
inline |
|
protectedpure virtual |
Implements ServerGroupBase.
|
protectedpure virtual |
|
inlinevirtual |
Removes a client from this group.
client | client |
Definition at line 106 of file ServerGroup.h.
|
inline |
sets the group identification key
&key | group identification key |
Definition at line 62 of file ServerGroup.h.
|
pure virtual |
Shuts down this server group.
|
protected |
Definition at line 160 of file ServerGroup.h.
|
protected |
Definition at line 158 of file ServerGroup.h.
|
protected |
Definition at line 155 of file ServerGroup.h.
|
protected |
Definition at line 156 of file ServerGroup.h.
|
protected |
Definition at line 154 of file ServerGroup.h.