0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
Hypertable::RawSocketHandler Class Referenceabstract

Abstract base class for application raw socket handlers registered with AsyncComm. More...

#include <RawSocketHandler.h>

Inheritance diagram for Hypertable::RawSocketHandler:
Inheritance graph
[legend]

Public Member Functions

virtual ~RawSocketHandler ()
 Destructor. More...
 
virtual bool handle (int sd, int events)=0
 Handle socket event. More...
 
virtual void deregister (int sd)=0
 Deregister handler for a given socket. More...
 
virtual int poll_interest (int sd)=0
 Returns desired polling interest for a socket. More...
 

Detailed Description

Abstract base class for application raw socket handlers registered with AsyncComm.

Allows applications to register a socket with the AsyncComm polling mechanism and perform raw event handling on the socket.

Definition at line 41 of file RawSocketHandler.h.

Constructor & Destructor Documentation

virtual Hypertable::RawSocketHandler::~RawSocketHandler ( )
inlinevirtual

Destructor.

Definition at line 45 of file RawSocketHandler.h.

Member Function Documentation

virtual void Hypertable::RawSocketHandler::deregister ( int  sd)
pure virtual

Deregister handler for a given socket.

This method is called by the communication layer after the socket has been removed from the polling mechanism.

Parameters
sdSocket descripter that was deregistered

Implemented in Hypertable::SshSocketHandler.

virtual bool Hypertable::RawSocketHandler::handle ( int  sd,
int  events 
)
pure virtual

Handle socket event.

Parameters
sdSocket descriptor
eventsBitmask of polling events
See also
PollEvent::Flags

Implemented in Hypertable::SshSocketHandler.

virtual int Hypertable::RawSocketHandler::poll_interest ( int  sd)
pure virtual

Returns desired polling interest for a socket.

This method returns the current polling interest for socket sd. After calling handle(), the communication layer will call this method to obtain the polling interest for sd and will make the appropriate adjustments with the underlying polling mechanism.

Parameters
sdSocket descriptor
Returns
Bitmask of desired polling interest for sd.
See also
PollEvent::Flags

Implemented in Hypertable::SshSocketHandler.


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