NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
CBDBEnvKeeperConnectionHandler Class Reference

Search Toolkit Book for CBDBEnvKeeperConnectionHandler

Actual event (command) responder (session state machine) More...

+ Inheritance diagram for CBDBEnvKeeperConnectionHandler:
+ Collaboration diagram for CBDBEnvKeeperConnectionHandler:

Public Member Functions

 CBDBEnvKeeperConnectionHandler (CBDBEnvKeeperServer *server)
virtual void OnOpen (void)
 Runs in response to an external event [asynchronous]. More...
virtual void OnMessage (BUF buf)
virtual void OnWrite (void)
 The client is ready to receive data. More...
- Public Member Functions inherited from IServer_LineMessageHandler
 IServer_LineMessageHandler ()
virtual int CheckMessage (BUF *buffer, const void *data, size_t size)
- Public Member Functions inherited from IServer_MessageHandler
 IServer_MessageHandler ()
virtual ~IServer_MessageHandler ()
virtual void OnRead (void)
 The client has just sent data. More...
- Public Member Functions inherited from IServer_ConnectionHandler
virtual ~IServer_ConnectionHandler ()
virtual EIO_Event GetEventsToPollFor (const CTime **) const
 Following three methods are guaranteed to be called NOT at the same time as On*, so if you implement them you should not guard the variables which they can use with mutexes. More...
virtual const STimeoutGetTimeout (void)
 Returns the timeout for this connection. More...
virtual bool IsOpen (void)
 Returns connection handler's perception of whether we open or not. More...
virtual bool IsReadyToProcess (void) const
 Returns the handler's readiness to process input data or to write some output data. More...
virtual void OnClose (EClosePeer)
 The connection has closed (with information on type of closing) More...
virtual void OnTimeout (void)
 Runs when a client has been idle for too long, prior to closing the connection [synchronous]. More...
virtual void OnTimer (void)
 This method is called at the moment in time specified earlier by the alarm_time parameter of the GetEventsToPollFor method [synchronous]. More...
virtual void OnOverflow (EOverflowReason)
 Runs when there are insufficient resources to queue a connection, prior to closing it. More...
virtual void OnError (const string &)
 Runs when a socket error is detected. More...
CSocketGetSocket (void)
 Get underlying socket. More...
void SetSocket (CSocket *socket)

Private Attributes


Additional Inherited Members

- Public Types inherited from IServer_ConnectionHandler
enum  EClosePeer { eOurClose , eClientClose }
 Type of connection closing. More...

Detailed Description

Actual event (command) responder (session state machine)

Definition at line 85 of file bdb_env_keeper.cpp.

Constructor & Destructor Documentation

◆ CBDBEnvKeeperConnectionHandler()

CBDBEnvKeeperConnectionHandler::CBDBEnvKeeperConnectionHandler ( CBDBEnvKeeperServer server)

Definition at line 88 of file bdb_env_keeper.cpp.

Member Function Documentation

◆ OnMessage()

void CBDBEnvKeeperConnectionHandler::OnMessage ( BUF  buf)

◆ OnOpen()

void CBDBEnvKeeperConnectionHandler::OnOpen ( void  )

Runs in response to an external event [asynchronous].

You can get socket by calling GetSocket(), if you close the socket this object will be destroyed. Individual events are: A client has just established this connection.

Implements IServer_ConnectionHandler.

Definition at line 99 of file bdb_env_keeper.cpp.

References CSocket::DisableOSSendDelay(), and IServer_ConnectionHandler::GetSocket().

◆ OnWrite()

virtual void CBDBEnvKeeperConnectionHandler::OnWrite ( void  )

The client is ready to receive data.

Implements IServer_ConnectionHandler.

Definition at line 94 of file bdb_env_keeper.cpp.

Member Data Documentation

◆ m_Server

CBDBEnvKeeperServer* CBDBEnvKeeperConnectionHandler::m_Server

Definition at line 96 of file bdb_env_keeper.cpp.

The documentation for this class was generated from the following file:
Modified on Mon Apr 22 04:04:31 2024 by rev. 669887