Class AsyncNngConnector

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class AsyncNngConnector : public O3DS::AsyncConnector

Subclassed by O3DS::AsyncPair, O3DS::AsyncPipeline, O3DS::AsyncPublisher, O3DS::AsyncRequestReply, O3DS::AsyncSubscriber

Public Functions

inline AsyncNngConnector()
inline virtual ~AsyncNngConnector()
void setError(const char *msg, int ret)
virtual bool start(const char *url) = 0

Starts the server - servers will listen, clients will dial.

virtual bool write(const char *data, size_t len) override

Writes an nng message.

virtual size_t read(char *data, size_t len) override

Read bytes - len is the size of data.

virtual size_t read(char **data, size_t *len) override

Read bytes, resize data if needed.

bool asyncReadMsg()

handles a nng_recv_aio call. Calls nng_recv_aio again if message was okay and returns true

virtual void stop()

Protected Attributes

nng_dialer mDialer
nng_aio *aio
nng_socket mSocket
std::mutex mutex
nng_ctx ctx