Struct UDPTransportDescriptor

Inheritance Relationships

Base Type

Derived Types

Struct Documentation

struct UDPTransportDescriptor : public eprosima::fastdds::rtps::SocketTransportDescriptor

UDP Transport configuration

  • m_output_udp_socket: source port to use for outgoing datagrams.

  • non_blocking_send: do not block on send operations. When it is set to true, send operations will return immediately if the buffer is full, but no error will be returned to the upper layer. This means that the application will behave as if the datagram is sent and lost.

Subclassed by eprosima::fastdds::rtps::UDPv4TransportDescriptor, eprosima::fastdds::rtps::UDPv6TransportDescriptor

Public Functions

virtual ~UDPTransportDescriptor() = default

Destructor.

RTPS_DllAPI UDPTransportDescriptor()

Constructor.

RTPS_DllAPI UDPTransportDescriptor(const UDPTransportDescriptor &t) = default

Copy constructor.

RTPS_DllAPI UDPTransportDescriptor & operator= (const UDPTransportDescriptor &t)=default

Copy assignment.

RTPS_DllAPI bool operator== (const UDPTransportDescriptor &t) const

Comparison operator.

Public Members

uint16_t m_output_udp_socket

Source port to use for outgoing datagrams.

bool non_blocking_send = false

Whether to use non-blocking calls to send_to().

When set to true, calls to send_to() will return immediately if the buffer is full, but no error will be returned to the upper layer. This means that the application will behave as if the datagram is sent but lost (i.e. throughput may be reduced). This value is specially useful on high-frequency best-effort writers.

When set to false, calls to send_to() will block until the network buffer has space for the datagram. This may hinder performance on high-frequency writers.