pub trait VirtualTcpListener: Debug + Send + Sync + 'static {
    fn accept(&self) -> Result<(Box<dyn VirtualTcpSocket + Sync>, SocketAddr)>;
    fn accept_timeout(
        &self,
        timeout: Duration
    ) -> Result<(Box<dyn VirtualTcpSocket + Sync>, SocketAddr)>; fn set_timeout(&mut self, timeout: Option<Duration>) -> Result<()>; fn timeout(&self) -> Result<Option<Duration>>; fn addr_local(&self) -> Result<SocketAddr>; fn set_ttl(&mut self, ttl: u8) -> Result<()>; fn ttl(&self) -> Result<u8>; }

Required Methods§

Accepts an connection attempt that was made to this listener

Accepts an connection attempt that was made to this listener (or times out)

Sets the accept timeout

Gets the accept timeout

Returns the local address of this TCP listener

Sets how many network hops the packets are permitted for new connections

Returns the maximum number of network hops before packets are dropped

Implementors§