#include <TCPRemotePeer.hpp>
Inheritance diagram for Ionflux::Tools::TCPRemotePeer:


| Public Member Functions | |
| TCPRemotePeer () | |
| Constructor. | |
| TCPRemotePeer (int initID) | |
| Constructor. | |
| virtual | ~TCPRemotePeer () | 
| Destructor. | |
| virtual bool | receive () | 
| Receive data. | |
| virtual bool | send (const std::string &bytes) | 
| Send data. | |
| virtual void | setID (int newID) | 
| Set ID. | |
| virtual void | setProtocolState (int newProtocolState) | 
| Set protocol state. | |
| virtual void | setMessageHandler (MessageHandler *newMessageHandler) | 
| Set message handler. | |
| virtual int | getID () | 
| Get ID of the peer. | |
| virtual TCPSocket & | getSocket () | 
| Get socket. | |
| virtual AuthData & | getAuthData () | 
| Get authentication data. | |
| virtual std::string & | getRecvBuf () | 
| Get receive buffer. | |
| virtual unsigned int | removeRecvBytes (unsigned int numBytes) | 
| Remove bytes from receive buffer. | |
| virtual void | clearRecvBuf () | 
| Clear the receive buffer. | |
| virtual int | getProtocolState () | 
| Get protocol state. | |
| virtual void * | getData () | 
| Get data. | |
| virtual unsigned int | getDataSize () | 
| Get size of data. | |
| virtual Message * | getMessage () | 
| Get message. | |
| virtual Node * | getCache () | 
| Get cache. | |
| virtual void | dump (Message &msg) | 
| Dump message. | |
| Static Public Attributes | |
| static const int | ID_NOT_SET = -1 | 
| Peer ID: Not set. | |
| static const int | PROTOCOL_STATE_UNDEFINED = -1 | 
| Protocol state: Undefined. | |
| Protected Attributes | |
| int | id | 
| Numerical ID of the peer. | |
| TCPSocket | socket | 
| Socket used to communicate with the remote peer. | |
| std::string | recvBuf | 
| Receive buffer. | |
| int | protocolState | 
| Protocol state. | |
| void * | data | 
| Peer data. | |
| unsigned int | dataSize | 
| Size of data. | |
| Message * | message | 
| Message. | |
| MessageHandler * | messageHandler | 
| Message handler. | |
| AuthData | auth | 
| Authentication data. | |
| Node * | cache | 
| Message data cache. | |
The remote peer of a TCP connection.
| 
 | 
| Constructor. Construct new TCPRemotePeer object. | 
| 
 | 
| Constructor. Construct new TCPRemotePeer object. 
 
 | 
| 
 | 
| Destructor. Destruct TCPRemotePeer object. | 
| 
 | 
| Clear the receive buffer. 
 | 
| 
 | 
| Dump message. Pass a message to the object for handling. 
 
 Implements Ionflux::Tools::MessageDump. | 
| 
 | 
| Get authentication data. Get the authentication data for this peer. 
 
 | 
| 
 | 
| Get cache. Get a node in which message data (or other arbitrary data) can be stored. 
 
 | 
| 
 | 
| Get data. 
 
 | 
| 
 | 
| Get size of data. 
 
 | 
| 
 | 
| Get ID of the peer. 
 
 | 
| 
 | 
| Get message. 
 
 | 
| 
 | 
| Get protocol state. 
 
 | 
| 
 | 
| Get receive buffer. 
 
 | 
| 
 | 
| Get socket. Get the socket used to communicate with the remote peer. 
 
 | 
| 
 | 
| Receive data. Receives data from the socket. The data will be appended to the receive buffer. 
 
 | 
| 
 | 
| Remove bytes from receive buffer. 
Removes the first  
 
 | 
| 
 | 
| Send data. Send data over the socket. 
 
 
 | 
| 
 | 
| Set ID. Sets the numerical ID of this peer. 
 
 | 
| 
 | 
| Set message handler. Set the message handler to be used for message handling. 
 
 
 | 
| 
 | 
| Set protocol state. Sets the current protocol state. Use this to set the protocol state for implementations of stateful protocols. 
 
 | 
| 
 | 
| Authentication data. 
 | 
| 
 | 
| Message data cache. Can be used by the application to store message data (or other arbitrary data). | 
| 
 | 
| Peer data. You can use this to associate arbitrary data with a remote peer. | 
| 
 | 
| Size of data. 
 | 
| 
 | 
| Numerical ID of the peer. 
 | 
| 
 | 
| Peer ID: Not set. 
 | 
| 
 | 
| This will be used for processing incoming data if you set a non-null message handler. | 
| 
 | 
| Message handler. 
 | 
| 
 | 
| Protocol state: Undefined. 
 | 
| 
 | 
| Protocol state. You can use this to keep track of protocol state in stateful protocols. | 
| 
 | 
| Receive buffer. 
 | 
| 
 | 
| Socket used to communicate with the remote peer. 
 | 
 1.4.6
 1.4.6