Class Connector
Defined in File base_connector.h
Inheritance Relationships
Derived Types
public O3DS::AsyncConnector
(Class AsyncConnector)public O3DS::BlockingNngConnector
(Class BlockingNngConnector)
Class Documentation
-
class Connector
Abstract base class for all connector.
The base server defines common methods for all servers and allows different server types to be easily swapped out. The base server holds a nng_socket object and string error.
Subclassed by O3DS::AsyncConnector, O3DS::BlockingNngConnector
Public Types
Public Functions
-
Connector()
-
virtual ~Connector()
-
virtual bool write(const char *data, size_t len) = 0
Write bytes - len is the size of data.
-
virtual size_t read(char *data, size_t len) = 0
Read bytes - len is the fixed size of buffer, returns the number of bytes read.
-
virtual size_t read(char **data, size_t *len) = 0
Read a message, realloc and rezie *data if needed. If the buffer is reszied, len will be updated. Returns the size of the message, which may be less than the buffer size
-
const std::string &getError()
-
void setError(const char *msg)
-
Connector()