[][src]Struct laminar::Socket

pub struct Socket { /* fields omitted */ }

A reliable UDP socket implementation with configurable reliability and ordering guarantees.

Methods

impl Socket[src]

pub fn bind<A: ToSocketAddrs>(
    addresses: A
) -> Result<(Self, Sender<Packet>, Receiver<SocketEvent>)>
[src]

Binds to the socket and then sets up ActiveConnections to manage the "connections". Because UDP connections are not persistent, we can only infer the status of the remote endpoint by looking to see if they are still sending packets or not

pub fn bind_with_config<A: ToSocketAddrs>(
    addresses: A,
    config: Config
) -> Result<(Self, Sender<Packet>, Receiver<SocketEvent>)>
[src]

Binds to the socket and then sets up ActiveConnections to manage the "connections". Because UDP connections are not persistent, we can only infer the status of the remote endpoint by looking to see if they are still sending packets or not

This function allows you to configure laminar with the passed configuration.

pub fn start_polling(&mut self) -> Result<()>[src]

Entry point to the run loop. This should run in a spawned thread since calls to poll.poll are blocking.

Auto Trait Implementations

impl Send for Socket

impl Sync for Socket

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]