Skip to main content

UdpConfig

Struct UdpConfig 

Source
pub struct UdpConfig {
    pub domain_id: u32,
    pub participant_id: Option<u32>,
    pub max_participant_id: u32,
    pub ports: PortMapping,
    pub interfaces: Vec<Ipv4Addr>,
    pub multicast_address: Ipv4Addr,
    pub multicast_ttl: u32,
    pub multicast_loopback: bool,
    pub receive_buffer_size: Option<usize>,
    pub send_buffer_size: Option<usize>,
}
Expand description

Settings of a UdpTransport.

Fields§

§domain_id: u32

The DDS domain id.

§participant_id: Option<u32>

The participant id. None picks the lowest id, starting at 0, whose unicast ports are free (9.6.2.1).

§max_participant_id: u32

The highest participant id tried when participant_id is None.

§ports: PortMapping

The port number parameters.

§interfaces: Vec<Ipv4Addr>

The interfaces to use, by their IPv4 address. Empty means the system’s choice: multicast is joined on the default interface and the unicast locators use the address of the default route.

§multicast_address: Ipv4Addr

The multicast group.

§multicast_ttl: u32

The time-to-live of multicast datagrams sent.

§multicast_loopback: bool

Whether multicast datagrams sent are also delivered to this host, so that participants on the same host find each other.

§receive_buffer_size: Option<usize>

The receive buffer to ask for on each socket that receives (SO_RCVBUF; the system may give less). A large sample comes as a burst of datagrams, which a small buffer drops. None keeps the system’s default.

§send_buffer_size: Option<usize>

The send buffer to ask for on each socket (SO_SNDBUF). On macOS it also bounds the largest datagram a socket can send, 9216 octets by default, so it must be at least the largest message sent (up to 64 KiB, see rustorb_rtps::frag). None keeps the system’s default.

Implementations§

Source§

impl UdpConfig

Source

pub fn new(domain_id: u32) -> Self

The default settings for a domain.

Trait Implementations§

Source§

impl Clone for UdpConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UdpConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.