![]() |
Vault
4.1
|
This abstract base class defines the interface that must be provided by a concrete server class in order to facilitate interaction with the classes that manage listeners, i/o threads, and messaging. More...
#include <vserver.h>
Public Member Functions | |
| virtual void | addClientSession (VClientSessionPtr session) |
| Notifies the server that it should keep track of the specified session, for example it will need to post a message to it and all other appropriate sessions when postBroadcastMessage is called. | |
| virtual void | removeClientSession (VClientSessionPtr session) |
| Notifies the server that it should no longer reference the specified session, presumably because it is about to be deleted. | |
| virtual void | postBroadcastMessage (const VString &clientType, VMessagePtr message, VClientSessionConstPtr omitSession)=0 |
| Posts a broadcast message to all specified client sessions' async output queues; the caller must not refer to the message after calling this function, because the message will be deleted or recycled after it has been sent. | |
Protected Attributes | |
| VClientSessionList | mSessions |
| Active sessions. | |
| VMutex | mSessionsMutex |
| Mutex to protect operations on mSessions. | |
This abstract base class defines the interface that must be provided by a concrete server class in order to facilitate interaction with the classes that manage listeners, i/o threads, and messaging.
| void VServer::addClientSession | ( | VClientSessionPtr | session | ) | [virtual] |
Notifies the server that it should keep track of the specified session, for example it will need to post a message to it and all other appropriate sessions when postBroadcastMessage is called.
| session | the session that has been created |
Definition at line 18 of file vserver.cpp.
References mSessions, and mSessionsMutex.
| void VServer::removeClientSession | ( | VClientSessionPtr | session | ) | [virtual] |
Notifies the server that it should no longer reference the specified session, presumably because it is about to be deleted.
| session | the session that is going away |
Definition at line 23 of file vserver.cpp.
References mSessions, and mSessionsMutex.
| virtual void VServer::postBroadcastMessage | ( | const VString & | clientType, |
| VMessagePtr | message, | ||
| VClientSessionConstPtr | omitSession | ||
| ) | [pure virtual] |
Posts a broadcast message to all specified client sessions' async output queues; the caller must not refer to the message after calling this function, because the message will be deleted or recycled after it has been sent.
| clientType | the client type, in case the server has different client types and this broadcast is only for a certain type |
| message | the message to be posted |
| omitSession | if not NULL, specifies a session the message will NOT be posted to |