[−][src]Struct bgb_link::net::listener::BgbListener
Methods
impl BgbListener
[src]
pub fn wrap(inner: TcpListener) -> BgbListener
[src]
Wraps the given TcpListener
and listens for BGB connections.
pub fn accept(&self) -> Result<(BgbStream<TcpStream>, SocketAddr)>
[src]
Accepts a connection and performs the BGB handshake before returning.
Additionally sets TCP_NODELAY as recommended by the spec.
If a bad handshake is received, returns an error of kind InvalidData
.
pub fn incoming(&self) -> BgbIncoming
[src]
Returns an Iterator
equivalent to calling accept
in a loop, but without
the SocketAddr
information. (idk why the standard library just did it like that)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BgbListener
impl Send for BgbListener
impl Sync for BgbListener
impl Unpin for BgbListener
impl UnwindSafe for BgbListener
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> 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>,