#include <framecodec.h>
Inheritance diagram for TPProto::FrameCodec:

Public Member Functions | |
| FrameCodec () | |
| Constructs object and sets up defaults. | |
| ~FrameCodec () | |
| Destructor. | |
| void | setAsyncFrameListener (AsyncFrameListener *afl) |
| Sets the AsyncFrameListener. | |
| void | setLogger (Logger *nlog) |
| Sets the Logger. | |
| void | setProtocolLayer (ProtocolLayer *pl) |
| Sets the ProtocolLayer. | |
| int | getStatus () |
| Gets the status of the connection. | |
| FrameConnection | sendFrame (boost::shared_ptr< Frame > f, const FrameSignal::slot_type &callback) |
| void | readyToRead () |
| Called when the socket has data ready to be read. | |
| void | readyToSend () |
| Called when the socket is ready for data to be sent to it. | |
| void | receivedFrame (Frame *frame) |
The FrameCodec class is responsible for handling the running of the protocol. It interacts with the Thousand Parsec servers and avoids a lot of unneccessary handling by the client and higher layers. The FrameCodec class is not the best way for a client to access a tp server, use the upper layers for that, but it can be used if necessary. A ProtocolLayer must be set (by setting this object as the FrameCodec for the ProtocolLayer).
| TPProto::FrameCodec::FrameCodec | ( | ) |
Constructs object and sets up defaults.
Defaults are
| void TPProto::FrameCodec::setAsyncFrameListener | ( | AsyncFrameListener * | afl | ) |
Sets the AsyncFrameListener.
Only one AsyncFrameListener is allowed currently. When a new listener is set, the old one if present is deleted.
| afl | The AsyncFrameListener to use. |
| void TPProto::FrameCodec::setLogger | ( | Logger * | nlog | ) |
| void TPProto::FrameCodec::setProtocolLayer | ( | ProtocolLayer * | pl | ) |
Sets the ProtocolLayer.
This method sets the ProtocolLayer.
| pl | The ProtocolLayer to use. |
| int TPProto::FrameCodec::getStatus | ( | ) |
Gets the status of the connection.
| void TPProto::FrameCodec::readyToRead | ( | ) | [virtual] |
Called when the socket has data ready to be read.
Protocol reading entry point is here. Non-blocking sockets should be used.
Implements TPProto::Connection.
| void TPProto::FrameCodec::readyToSend | ( | ) | [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.
Implements TPProto::Connection.
1.5.1