|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLNET::CCallbackServer Class ReferenceServer class for layer 3.
More...
#include <callback_server.h>
Inheritance diagram for NLNET::CCallbackServer:
List of all members.
Public Methods |
| CCallbackServer (TRecordingState rec=Off, const std::string &recfilename="", bool recordall=true) |
| Constructor. More...
|
void | send (const CMessage &buffer, TSockId hostid, bool log=true) |
| Sends a message to the specified host. More...
|
bool | flush (TSockId destid) |
| Force to send all data pending in the send queue. More...
|
void | update (sint32 timeout=0) |
| Updates the network (call this method evenly). More...
|
void | setConnectionCallback (TNetCallback cb, void *arg) |
| Sets callback for incoming connections (or NULL to disable callback). More...
|
void | setDisconnectionCallback (TNetCallback cb, void *arg) |
| Sets callback for disconnections (or NULL to disable callback). More...
|
bool | connected () const |
| Returns true if the connection is still connected. on server, we always "connected". More...
|
void | disconnect (TSockId hostid) |
| Disconnect a connection Set hostid to InvalidSockId to disconnect all connections. More...
|
const CInetAddress & | hostAddress (TSockId hostid) |
| Returns the address of the specified host. More...
|
virtual TSockId | getSockId (TSockId hostid=InvalidSockId) |
| Returns the sockid (cf. CCallbackClient). More...
|
uint64 | getReceiveQueueSize () |
uint64 | getSendQueueSize () |
Private Methods |
void | send (const NLMISC::CMemStream &buffer, TSockId hostid) |
| This function is public in the base class and put it private here because user cannot use it in layer 2. More...
|
bool | dataAvailable () |
| Checks if there is some data to receive. More...
|
void | receive (CMessage &buffer, TSockId *hostid) |
| On this layer, you can't call directly receive, It s the update() function that receive and call your callaback. More...
|
void | sendAllMyAssociations (TSockId to) |
| Used by client and server class. More...
|
Private Attributes |
TNetCallback | _ConnectionCallback |
| Connection callback. More...
|
void * | _ConnectionCbArg |
| Argument of the connection callback. More...
|
Friends |
void | cbsNewConnection (TSockId from, void *data) |
Detailed Description
Server class for layer 3.
-
Author:
-
Vianney Lecroart , Nevrax France
-
Date:
-
2001
Definition at line 44 of file callback_server.h.
Constructor & Destructor Documentation
NLNET::CCallbackServer::CCallbackServer |
( |
TRecordingState |
rec = Off, |
|
|
const std::string & |
recfilename = "", |
|
|
bool |
recordall = true |
|
) |
|
|
Member Function Documentation
bool NLNET::CCallbackServer::connected |
( |
|
) |
const [inline, virtual] |
|
bool NLNET::CCallbackServer::dataAvailable |
( |
|
) |
[private] |
|
void NLNET::CCallbackServer::disconnect |
( |
TSockId |
hostid |
) |
[virtual] |
|
bool NLNET::CCallbackServer::flush |
( |
TSockId |
destid |
) |
[inline] |
|
uint64 NLNET::CCallbackServer::getReceiveQueueSize |
( |
|
) |
[inline, virtual] |
|
uint64 NLNET::CCallbackServer::getSendQueueSize |
( |
|
) |
[inline, virtual] |
|
void NLNET::CCallbackServer::receive |
( |
CMessage & |
buffer, |
|
|
TSockId * |
hostid |
|
) |
[private, virtual] |
|
void NLNET::CCallbackServer::send |
( |
const CMessage & |
buffer, |
|
|
TSockId |
hostid, |
|
|
bool |
log = true |
|
) |
[virtual] |
|
void NLNET::CCallbackServer::sendAllMyAssociations |
( |
TSockId |
to |
) |
[private] |
|
void NLNET::CCallbackServer::setConnectionCallback |
( |
TNetCallback |
cb, |
|
|
void * |
arg |
|
) |
[inline] |
|
void NLNET::CCallbackServer::setDisconnectionCallback |
( |
TNetCallback |
cb, |
|
|
void * |
arg |
|
) |
[inline] |
|
void NLNET::CCallbackServer::update |
( |
sint32 |
timeout = 0 |
) |
[virtual] |
|
Friends And Related Function Documentation
void cbsNewConnection |
( |
TSockId |
from, |
|
|
void * |
data |
|
) |
[friend] |
|
Member Data Documentation
TNetCallback NLNET::CCallbackServer::_ConnectionCallback [private]
|
|
void* NLNET::CCallbackServer::_ConnectionCbArg [private]
|
|
The documentation for this class was generated from the following files:
|
|