[−][src]Struct laminar::Socket
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]
addresses: A
) -> Result<(Self, Sender<Packet>, Receiver<SocketEvent>)>
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]
addresses: A,
config: Config
) -> Result<(Self, Sender<Packet>, Receiver<SocketEvent>)>
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
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,