|
syncsys
|
basisnetwork-server More...
#include <network.h>
Public Member Functions | |
| BasicServer (unsigned int maxbuffer=1024 *1024, unsigned short CloseMsg=-1) | |
| standard c'tor | |
| bool | StartRunning (int port) |
| set server in listening mode. | |
| void | StopRunning (void) |
| stop and reset the server. | |
| void | Kick (BasicServerClient *c) |
| kick a definit client. Not very fast. | |
| void | HandleClientSyncPacket (void) |
| call HandleSyncPacket for all connected clients. | |
| virtual BasicServerClient * | ClientConnected (InitData &)=0 |
| Callback for the clientconnected-event. O. | |
| void | Send (const char *daten, unsigned int size, unsigned short MSG, short Compression=Z_BEST_SPEED) |
| Send a message to all(!) connected clients. | |
| void | Send (const helpers::NetworkBuffer &buffer, unsigned short MSG, short Compression=Z_BEST_SPEED) |
| Send a message to all(!) connected clients. | |
| unsigned int | GetMaxBufferSize (void) |
| getter for max of allowed paketsize (=unzipped size and zipped size). | |
| size_t | GetClientCount (void) |
| getter for the connected client count. | |
Protected Member Functions | |
| std::list< BasicServerClient * > ::const_iterator | GetClientListBegin (void) |
| give you a startiterator. | |
|
std::list< BasicServerClient * > ::const_iterator | GetClientListEnd (void) |
| give you a enditerator | |
| void | UnlockClientList (void) |
| Unlock the clientlist. | |
basisnetwork-server
| virtual BasicServerClient* netlib::BasicServer::ClientConnected | ( | InitData & | ) | [pure virtual] |
Callback for the clientconnected-event. O.
overload and return a allocated instance of your serverclient/participant/connected client or return NULL if you dont want to accept the client.
| std::list<BasicServerClient*>::const_iterator netlib::BasicServer::GetClientListBegin | ( | void | ) | [inline, protected] |
give you a startiterator.
| void netlib::BasicServer::HandleClientSyncPacket | ( | void | ) |
call HandleSyncPacket for all connected clients.
| void netlib::BasicServer::Send | ( | const char * | daten, |
| unsigned int | size, | ||
| unsigned short | MSG, | ||
| short | Compression = Z_BEST_SPEED |
||
| ) |
Send a message to all(!) connected clients.
| void netlib::BasicServer::Send | ( | const helpers::NetworkBuffer & | buffer, |
| unsigned short | MSG, | ||
| short | Compression = Z_BEST_SPEED |
||
| ) | [inline] |
Send a message to all(!) connected clients.
| void netlib::BasicServer::StopRunning | ( | void | ) |
stop and reset the server.
1.7.3