|
|
|
|
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
[legend]Collaboration diagram for NLNET::CCallbackServer:
[legend]List of all members.
Public Methods |
| CCallbackServer () |
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. More...
|
const CInetAddress& | hostAddress (TSockId hostid) |
| Returns the address of the specified host. More...
|
virtual TSockId | getSockId (TSockId hostid = 0) |
| returns the sockid of a connection. On a server, this function returns the parameter. On a client, it returns the connection. More...
|
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 () |
| This function is implemented in the client and server class. 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(s):
-
Vianney Lecroart , Nevrax France
-
Date:
-
2001
Definition at line 44 of file callback_server.h.
Constructor & Destructor Documentation
NLNET::CCallbackServer::CCallbackServer (
|
)
|
|
Member Function Documentation
bool NLNET::CCallbackServer::connected (
|
) const [inline, virtual]
|
|
bool NLNET::CCallbackServer::dataAvailable (
|
) [inline, private, virtual]
|
|
void NLNET::CCallbackServer::disconnect (
|
TSockId hostid ) [inline, virtual]
|
|
bool NLNET::CCallbackServer::flush (
|
TSockId destid ) [inline, virtual]
|
|
TSockId NLNET::CCallbackServer::getSockId (
|
TSockId hostid = 0 ) [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:
|
|