pub struct UdpTransport { /* private fields */ }Expand description
The UDPv4 sockets of one participant.
Implementations§
Source§impl UdpTransport
impl UdpTransport
Sourcepub fn open(config: &UdpConfig) -> Result<(UdpTransport, Incoming)>
pub fn open(config: &UdpConfig) -> Result<(UdpTransport, Incoming)>
Opens the sockets, joins the multicast group and starts receiving.
Sourcepub fn open_with(
config: &UdpConfig,
user: Option<UserHandler>,
) -> Result<(UdpTransport, Incoming)>
pub fn open_with( config: &UdpConfig, user: Option<UserHandler>, ) -> Result<(UdpTransport, Incoming)>
Like Self::open, with user traffic given to user on the
receiving threads (see Sink).
Sourcepub fn injector(&self) -> Sink
pub fn injector(&self) -> Sink
A sender of datagrams to this transport’s Incoming, for
another transport (shared memory) to deliver there too.
Sourcepub fn participant_id(&self) -> u32
pub fn participant_id(&self) -> u32
The participant id that was chosen.
Sourcepub fn discovery_unicast_locators(&self) -> Vec<Locator>
pub fn discovery_unicast_locators(&self) -> Vec<Locator>
Where other participants reach this one’s built-in endpoints by
unicast (metatrafficUnicastLocatorList).
Sourcepub fn discovery_multicast_locators(&self) -> Vec<Locator>
pub fn discovery_multicast_locators(&self) -> Vec<Locator>
metatrafficMulticastLocatorList: the group on the discovery
multicast port.
Sourcepub fn user_unicast_locators(&self) -> Vec<Locator>
pub fn user_unicast_locators(&self) -> Vec<Locator>
defaultUnicastLocatorList: where user endpoints are reached by
unicast.
Sourcepub fn user_multicast_locators(&self) -> Vec<Locator>
pub fn user_multicast_locators(&self) -> Vec<Locator>
defaultMulticastLocatorList: the group on the user multicast
port.
Sourcepub fn unicast_addresses(&self) -> &[Ipv4Addr]
pub fn unicast_addresses(&self) -> &[Ipv4Addr]
The IPv4 addresses this transport’s unicast locators carry.
Trait Implementations§
Source§impl Debug for UdpTransport
impl Debug for UdpTransport
Source§impl Drop for UdpTransport
impl Drop for UdpTransport
Auto Trait Implementations§
impl !RefUnwindSafe for UdpTransport
impl !UnwindSafe for UdpTransport
impl Forget for UdpTransport
impl Freeze for UdpTransportwhere
*const u8 is !null: Freeze,
PhantomData<Ipv4Addr>: Freeze,
*const ArcInner<UdpSocket> is !null: Freeze,
PhantomData<ArcInner<UdpSocket>>: Freeze,
PhantomData<UdpSocket>: Freeze,
*const ArcInner<Atomic<bool>> is !null: Freeze,
PhantomData<ArcInner<Atomic<bool>>>: Freeze,
PhantomData<JoinHandle<()>>: Freeze,
*mut Counter<Channel<Datagram>>: Freeze,
*mut Counter<Channel<Datagram>>: Freeze,
*mut Counter<Channel<Datagram>>: Freeze,
*const ArcInner<dyn Fn(Datagram) -> Option<Datagram> + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(Datagram) -> Option<Datagram> + Sync + Send>>: Freeze,
*const ArcInner<Atomic<usize>> is !null: Freeze,
PhantomData<ArcInner<Atomic<usize>>>: Freeze,
impl Move for UdpTransport
impl Send for UdpTransport
impl Sync for UdpTransport
impl Unpin for UdpTransportwhere
*const u8 is !null: Unpin,
Arc<UdpSocket>: Unpin,
I32NotAllOnes: Unpin,
Arc<Atomic<bool>>: Unpin,
Arc<Inner, System>: Unpin,
Arc<Packet<'static, ()>>: Unpin,
*mut Counter<Channel<Datagram>>: Unpin,
*mut Counter<Channel<Datagram>>: Unpin,
*mut Counter<Channel<Datagram>>: Unpin,
Arc<dyn Fn(Datagram) -> Option<Datagram> + Sync + Send>: Unpin,
Arc<Atomic<usize>>: Unpin,
impl UnsafeUnpin for UdpTransportwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Ipv4Addr>: UnsafeUnpin,
*const ArcInner<UdpSocket> is !null: UnsafeUnpin,
PhantomData<ArcInner<UdpSocket>>: UnsafeUnpin,
PhantomData<UdpSocket>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
PhantomData<JoinHandle<()>>: UnsafeUnpin,
*mut Counter<Channel<Datagram>>: UnsafeUnpin,
*mut Counter<Channel<Datagram>>: UnsafeUnpin,
*mut Counter<Channel<Datagram>>: UnsafeUnpin,
*const ArcInner<dyn Fn(Datagram) -> Option<Datagram> + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(Datagram) -> Option<Datagram> + Sync + Send>>: UnsafeUnpin,
*const ArcInner<Atomic<usize>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<usize>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more