DelegateMQ
Loading...
Searching...
No Matches
ZeroMqTransport Class Reference

ZeroMQ transport class. ZeroMQ socket instances must only be called by a single thread of control. Each transport instance has its own internal thread of control and all transport APIs are asynchronous. Each instances is an "active object" with a private internal thread of control and async public APIs. More...

#include <ZeroMqTransport.h>

Inheritance diagram for ZeroMqTransport:
ITransport

Public Types

enum class  Type { PAIR_CLIENT , PAIR_SERVER , PUB , SUB }
 

Public Member Functions

 ZeroMqTransport ()
 
 ~ZeroMqTransport ()
 
int Create (Type type, const char *addr)
 
void Close ()
 
void Destroy ()
 
virtual int Send (xostringstream &os, const DmqHeader &header) override
 
virtual int Receive (xstringstream &is, DmqHeader &header) override
 
void SetTransportMonitor (ITransportMonitor *transportMonitor)
 
void SetSendTransport (ITransport *sendTransport)
 
void SetRecvTransport (ITransport *recvTransport)
 
- Public Member Functions inherited from ITransport

Detailed Description

ZeroMQ transport class. ZeroMQ socket instances must only be called by a single thread of control. Each transport instance has its own internal thread of control and all transport APIs are asynchronous. Each instances is an "active object" with a private internal thread of control and async public APIs.

Member Enumeration Documentation

◆ Type

enum class ZeroMqTransport::Type
strong
Enumerator
PAIR_CLIENT 
PAIR_SERVER 
PUB 
SUB 

Constructor & Destructor Documentation

◆ ZeroMqTransport()

ZeroMqTransport::ZeroMqTransport ( )
inline

◆ ~ZeroMqTransport()

ZeroMqTransport::~ZeroMqTransport ( )
inline

Member Function Documentation

◆ Close()

void ZeroMqTransport::Close ( )
inline

◆ Create()

int ZeroMqTransport::Create ( Type type,
const char * addr )
inline

◆ Destroy()

void ZeroMqTransport::Destroy ( )
inline

◆ Receive()

virtual int ZeroMqTransport::Receive ( xstringstream & is,
DmqHeader & header )
inlineoverridevirtual

Receive data from a remote

Parameters
[out]isThe received incoming data bytes, not including the header.
[out]headerIncoming delegate message header.
Returns
0 if success.

Implements ITransport.

◆ Send()

virtual int ZeroMqTransport::Send ( xostringstream & os,
const DmqHeader & header )
inlineoverridevirtual

Send data to a remote

Parameters
[in]osOutput stream to send.
[in]headerThe header to send.
Returns
0 if success.

Implements ITransport.

◆ SetRecvTransport()

void ZeroMqTransport::SetRecvTransport ( ITransport * recvTransport)
inline

◆ SetSendTransport()

void ZeroMqTransport::SetSendTransport ( ITransport * sendTransport)
inline

◆ SetTransportMonitor()

void ZeroMqTransport::SetTransportMonitor ( ITransportMonitor * transportMonitor)
inline

The documentation for this class was generated from the following file: