Trait wasmer_vnet::VirtualTcpListener
source · 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§
sourcefn accept(&self) -> Result<(Box<dyn VirtualTcpSocket + Sync>, SocketAddr)>
fn accept(&self) -> Result<(Box<dyn VirtualTcpSocket + Sync>, SocketAddr)>
Accepts an connection attempt that was made to this listener
sourcefn accept_timeout(
&self,
timeout: Duration
) -> Result<(Box<dyn VirtualTcpSocket + Sync>, SocketAddr)>
fn accept_timeout(
&self,
timeout: Duration
) -> Result<(Box<dyn VirtualTcpSocket + Sync>, SocketAddr)>
Accepts an connection attempt that was made to this listener (or times out)
sourcefn addr_local(&self) -> Result<SocketAddr>
fn addr_local(&self) -> Result<SocketAddr>
Returns the local address of this TCP listener