TDME2 1.9.121
|
Base class for network servers. More...
#include <tdme/network/udpserver/Server.h>
Public Types | |
typedef std::set< std::string > | ClientKeySet |
typedef std::set< std::string > | GroupKeySet |
Public Member Functions | |
Server (const std::string &name, const std::string &host, const unsigned int port, const unsigned int maxCCU) | |
void | setIOThreadCount (const unsigned int ioThreadCount) |
Sets up the numbers of threads to handle IO and framing. More... | |
void | setWorkerThreadCount (const unsigned int workerThreadCount) |
Sets up the number of workers that handle requests in thread pool. More... | |
void | setThreadPoolMaxElements (const unsigned int maxElements) |
Sets up max number of elements in worker thread pool queue. More... | |
virtual | ~Server () |
destructor More... | |
ClientKeySet | getClientKeySet () |
get a copy of current client keys More... | |
CLIENT * | getClientByKey (const std::string &clientKey) |
retrieve a client by key, the client reference is acquired, must be released after usage More... | |
ClientKeySet | getGroupKeySet () |
get a copy of current group keys More... | |
GROUP * | getGroupByKey (const std::string &groupKey) |
retrieve a group by key, the group reference is acquired, must be released after usage More... | |
Protected Types | |
typedef std::map< const std::string, CLIENT * > | ClientKeyMap |
typedef std::map< const std::string, CLIENT * > | GroupKeyMap |
typedef std::set< CLIENT * > | ClientSet |
Protected Member Functions | |
bool | setClientKey (CLIENT *client, const std::string &clientKey) |
sets a client identification key More... | |
void | closeClient (CLIENT *client) |
closes a client connection More... | |
bool | setGroupKey (GROUP *group, const std::string &groupKey) |
sets a group identification key More... | |
void | closeGroup (GROUP *group) |
closes a group connection More... | |
Protected Attributes | |
std::string | name |
std::string | host |
unsigned int | port |
unsigned int | maxCCU |
Barrier * | startUpBarrier |
ClientKeyMap | clientKeyMap |
ClientKeySet | clientKeySet |
ReadWriteLock | clientKeyListsReadWriteLock |
GroupKeyMap | groupKeyMap |
GroupKeySet | groupKeySet |
ReadWriteLock | groupKeyListsReadWriteLock |
unsigned int | ioThreadCount |
unsigned int | workerThreadPoolCount |
unsigned int | workerThreadPoolMaxElements |
Base class for network servers.
|
protected |
typedef std::set<std::string> ClientKeySet |
|
protected |
typedef std::set<std::string> GroupKeySet |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |