Struct tokio_shared_udp_socket::SharedUdpSocket[][src]

pub struct SharedUdpSocket { /* fields omitted */ }

A UDP socket that can easily be shared amongst a bunch of different futures.

Methods

impl SharedUdpSocket
[src]

Create a new SharedUdpSocket from a UdpSocket.

Creates a UdpEndpoint object which receives all packets that arrive from the given address. UdpEndpoint can also be used as a Sink to send packets. If another UdpEndpoint with the given address already exists then it will no longer receive packets since the newly created UdpEndpoint will take precedence.

Creates a UdpEndpoint object which receives all packets that arrive from the given address. UdpEndpoint can also be used as a Sink to send packets. Unlike the endpoint method, this method will not replace any pre-existing UdpEndpoint associated with the given address and will instead return None if one exists.

Steals the udp socket (if it hasn't already been stolen) causing all other SharedUdpSocket and UdpEndpoint streams to end.

Trait Implementations

impl Drop for SharedUdpSocket
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations