pub struct NetAccept<S: NetSession, L: NetListener<Stream = S::Connection> = TcpListener> { /* private fields */ }
Expand description

A reactor-manageable network listener (TCP, but not limiting to) which can be aware of additional encryption, authentication and other forms of transport-layer protocols which will be automatically injected into accepted connections.

Implementations§

Binds listener to the provided socket address(es) with a given context.

The session_context object provides information for encryption, authentication and other protocols which are a part of the application- specific transport layer and are automatically injected into the new sessions constructed by this listener before they are inserted into the reactor and notifications are delivered to reactor::Handler. The injection is made by calling [NetSession::accept] method.

Returns the local net::SocketAddr on which listener accepts connections.

Trait Implementations§

Extracts the raw file descriptor. Read more
Formats the value using the given formatter. Read more
Resource identifier type.
Events which resource may generate upon receiving I/O from the reactor via Self::handle_io. These events are passed to the reactor crate::Handler.
Method returning the ResourceId.
Method informing the reactor which types of events this resource is subscribed for.
Method called by the reactor when an I/O event is received for this resource in a result of poll syscall.
Write a buffer into this writer, returning how many bytes were written. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Like write, except that it writes from a slice of buffers. Read more
🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
Attempts to write an entire buffer into this writer. Read more
🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Creates a “by reference” adapter for this instance of Write. Read more
Checks whether resource can be written to without blocking.
Empties any write buffers in a non-blocking way. If a non-blocking operation is not possible, errors with io::ErrorKind::WouldBlock kind of io::Error. Read more
Writes to the resource in a non-blocking way, buffering the data if necessary - or failing with a system-level error. Read more
Atomic non-blocking I/O write operation, which must either write the whole buffer to a resource without blocking - or fail with WriteError::NotReady error.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.