[−][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
impl Unpin for Socket
impl Sync for Socket
impl Send for Socket
impl UnwindSafe for Socket
impl RefUnwindSafe for Socket
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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<U> 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<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,