Represents a UDP endpoint. More...
#include <UdpEndpoint.hpp>
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... | |
Represents a UDP endpoint.
RCF::UdpEndpoint::UdpEndpoint | ( | int | port | ) |
Constructs a UdpEndpoint from a port number. The IP address defaults to 127.0.0.1 .
RCF::UdpEndpoint::UdpEndpoint | ( | const std::string & | ip, |
int | port | ||
) |
Constructs a UdpEndpoint from an IP address and port number.
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.
void RCF::UdpEndpoint::listenOnMulticast | ( | const IpAddress & | multicastIp | ) |
Listen for multicast messages on the given IP address.
void RCF::UdpEndpoint::listenOnMulticast | ( | const std::string & | multicastIp | ) |
Listen for multicast messages on the given IP address.