pub struct TcpSocketListener { /* private fields */ }Expand description
A socket listener for TCP
Implementations§
Trait Implementations§
Source§impl SocketListener for TcpSocketListener
impl SocketListener for TcpSocketListener
Source§type Stream = StreamWithAddress<TcpStream>
type Stream = StreamWithAddress<TcpStream>
This type contract allows your
ServerConnector or SocketService
to use a connection type that is convenient for your listener.Source§fn poll_accept(
&mut self,
context: &mut Context<'_>,
) -> Poll<SocketResult<StreamWithAddress<TcpStream>>>
fn poll_accept( &mut self, context: &mut Context<'_>, ) -> Poll<SocketResult<StreamWithAddress<TcpStream>>>
Like
tokio::net::TcpListener::poll_accept, this function returns a
socket connection.Auto Trait Implementations§
impl !Freeze for TcpSocketListener
impl RefUnwindSafe for TcpSocketListener
impl Send for TcpSocketListener
impl Sync for TcpSocketListener
impl Unpin for TcpSocketListener
impl UnsafeUnpin for TcpSocketListener
impl UnwindSafe for TcpSocketListener
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more