Remote Call Framework 3.1
RCF::UdpEndpoint Class Reference

Represents a UDP endpoint. More...

#include <UdpEndpoint.hpp>

Inheritance diagram for RCF::UdpEndpoint:
RCF::Endpoint

Public Member Functions

 UdpEndpoint (int port)
 Constructs a UdpEndpoint from a port number. The IP address defaults to 127.0.0.1 . More...
 
 UdpEndpoint (const std::string &ip, int port)
 Constructs a UdpEndpoint from an IP address and port number. More...
 
void enableSharedAddressBinding (bool enable=true)
 Enables shared address binding. Uses SO_REUSEPORT socket option to allow multiple servers (even in different processes), to listen to broadcast messages on the same port. More...
 
void listenOnMulticast (const IpAddress &multicastIp)
 Listen for multicast messages on the given IP address. More...
 
void listenOnMulticast (const std::string &multicastIp)
 Listen for multicast messages on the given IP address. More...
 

Detailed Description

Represents a UDP endpoint.

Constructor & Destructor Documentation

◆ UdpEndpoint() [1/2]

RCF::UdpEndpoint::UdpEndpoint ( int  port)

Constructs a UdpEndpoint from a port number. The IP address defaults to 127.0.0.1 .

◆ UdpEndpoint() [2/2]

RCF::UdpEndpoint::UdpEndpoint ( const std::string &  ip,
int  port 
)

Constructs a UdpEndpoint from an IP address and port number.

Member Function Documentation

◆ enableSharedAddressBinding()

void RCF::UdpEndpoint::enableSharedAddressBinding ( bool  enable = true)

Enables shared address binding. Uses SO_REUSEPORT socket option to allow multiple servers (even in different processes), to listen to broadcast messages on the same port.

◆ listenOnMulticast() [1/2]

void RCF::UdpEndpoint::listenOnMulticast ( const IpAddress multicastIp)

Listen for multicast messages on the given IP address.

◆ listenOnMulticast() [2/2]

void RCF::UdpEndpoint::listenOnMulticast ( const std::string &  multicastIp)

Listen for multicast messages on the given IP address.


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