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

#include <ArmLwipNetconnUdpTransport.h>

Inheritance diagram for NetconnUdpTransport:
ITransport

Public Types

enum class  Type { PUB , SUB }
 

Public Member Functions

 NetconnUdpTransport ()
 
 ~NetconnUdpTransport ()
 
int Create (Type type, const char *addr, uint16_t port)
 
void Close ()
 Clean up the netconn resources.
 
virtual int Send (xostringstream &os, const DmqHeader &header) override
 
virtual int Receive (xstringstream &is, DmqHeader &header) override
 
void SetTransportMonitor (ITransportMonitor *monitor)
 
void SetSendTransport (ITransport *transport)
 
void SetRecvTransport (ITransport *transport)
 
- Public Member Functions inherited from ITransport

Member Enumeration Documentation

◆ Type

enum class NetconnUdpTransport::Type
strong
Enumerator
PUB 
SUB 

Constructor & Destructor Documentation

◆ NetconnUdpTransport()

NetconnUdpTransport::NetconnUdpTransport ( )
inline

◆ ~NetconnUdpTransport()

NetconnUdpTransport::~NetconnUdpTransport ( )
inline

Member Function Documentation

◆ Close()

void NetconnUdpTransport::Close ( )
inline

Clean up the netconn resources.

◆ Create()

int NetconnUdpTransport::Create ( Type type,
const char * addr,
uint16_t port )
inline

Initialize the Netconn UDP connection

Parameters
typePUB or SUB
addrTarget IP string (e.g. "192.168.1.50") for PUB; Ignored for SUB.
portLocal port to bind (SUB) or Remote port to target (PUB).
Returns
0 on success, -1 on failure

◆ Receive()

virtual int NetconnUdpTransport::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 NetconnUdpTransport::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 NetconnUdpTransport::SetRecvTransport ( ITransport * transport)
inline

◆ SetSendTransport()

void NetconnUdpTransport::SetSendTransport ( ITransport * transport)
inline

◆ SetTransportMonitor()

void NetconnUdpTransport::SetTransportMonitor ( ITransportMonitor * monitor)
inline

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