Vault  4.1
Public Member Functions | Protected Attributes
VServer Class Reference

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>

List of all members.

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.

Detailed Description

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.

Definition at line 28 of file vserver.h.


Member Function Documentation

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.

Parameters:
sessionthe 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.

Parameters:
sessionthe 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.

Parameters:
clientTypethe client type, in case the server has different client types and this broadcast is only for a certain type
messagethe message to be posted
omitSessionif not NULL, specifies a session the message will NOT be posted to

The documentation for this class was generated from the following files:

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.