#include <connector.h>
Public Member Functions | |
virtual | ~Connector () |
virtual void | disconnect ()=0 |
Disconnect this connector. | |
virtual Data * | read ()=0 |
Add the "owning" object, which is to be notified of disconnections. | |
virtual ssize_t | write (const Data &b)=0 |
Write a blob of data to the underlying connection. | |
virtual std::string | get_id () const =0 |
Instance identification string (abstract virtual). | |
virtual bool | connected () const =0 |
Are we currently connected? | |
Static Protected Attributes | |
static const size_t | BufSize = 4096 |
Objects of this class (really, of a sublass of this class) contain the information necessary to open or establish a particular type of connection, such as a Unix-domain socket, a TCP socket, a file, or a memory buffer. These objects also codify how to handle disconnection, and how to read from and/or write to that connection.
Definition at line 65 of file connector.h.
virtual Connector::~Connector | ( | ) | [inline, virtual] |
Definition at line 71 of file connector.h.
virtual void Connector::disconnect | ( | ) | [pure virtual] |
Disconnect this connector.
This function performs the connector- specific functions necessary for disconnection.
Implemented in FDConnector, History, LogFile, and TTYConnector.
virtual Data* Connector::read | ( | ) | [pure virtual] |
Add the "owning" object, which is to be notified of disconnections.
Implemented in FDConnector, History, and TTYConnector.
virtual ssize_t Connector::write | ( | const Data & | b | ) | [pure virtual] |
Write a blob of data to the underlying connection.
Implemented in FDConnector, History, and TTYConnector.
Referenced by socket_sender().
virtual std::string Connector::get_id | ( | ) | const [pure virtual] |
Instance identification string (abstract virtual).
Implemented in FDConnector, History, LogFile, SocketConnector, and TTYConnector.
virtual bool Connector::connected | ( | ) | const [pure virtual] |
const size_t Connector::BufSize = 4096 [static, protected] |
Used to size the read buffer. XXX - Probably doesn't belong here, but in some subclass.
Definition at line 116 of file connector.h.
Referenced by TTYConnector::read(), and FDConnector::read().