TPProto::Connection Class Reference

Abstract class for reading and writing to sockets. More...

#include <connection.h>

Inheritance diagram for TPProto::Connection:

TPProto::FrameCodec List of all members.

Public Member Functions

void setSocket (TPSocket *sock)
void setEventLoop (EventLoop *el)
virtual void readyToRead ()=0
 Called when the socket has data ready to be read.
virtual void readyToSend ()=0
 Called when the socket is ready for data to be sent to it.

Protected Attributes

TPSocketsocket
 The TPSocket this connection is connected to.
EventLoopeventloop
 The EventLoop to use.

Detailed Description

Abstract class for reading and writing to sockets.

The protocol releated to the this connection and socket is implemented in a subclass of Connection.


Member Function Documentation

virtual void TPProto::Connection::readyToRead (  )  [pure virtual]

Called when the socket has data ready to be read.

Protocol reading entry point is here. Non-blocking sockets should be used.

Implemented in TPProto::FrameCodec.

virtual void TPProto::Connection::readyToSend (  )  [pure virtual]

Called when the socket is ready for data to be sent to it.

This can be used to send queued data when non-blocking writes say they would have blocked.

Implemented in TPProto::FrameCodec.


The documentation for this class was generated from the following files:
Generated on Tue Jan 6 08:45:49 2009 for libtpproto-cpp by  doxygen 1.5.1