Open MediosZ opened 2 years ago
TcpListener:
fn local_addr(&self) -> io::Result<SocketAddr>; // ok
fn try_clone(&self) -> io::Result<TcpListener>; // ok
fn set_ttl(&self, ttl: u32) -> io::Result<()>; // not supported now,but I think it is not a core feature. I will implement an empty api.
fn ttl(&self) -> io::Result<u32>; //
fn take_error(&self) -> io::Result<Option<io::Error>>; // ok
fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()>; // ok
TcpStream:
fn connect_timeout(addr: &SocketAddr, timeout: Duration) -> io::Result<TcpStream>; // ok
fn try_clone(&self) -> io::Result<TcpStream>; // ok
fn set_ttl(&self, ttl: u32) -> io::Result<()>; // implement an empty api.
fn ttl(&self) -> io::Result<u32>; //
fn take_error(&self) -> io::Result<Option<io::Error>>; // ok
fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()>; // ok
fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()>; // ok
fn read_timeout(&self) -> io::Result<Option<Duration>>; // ok
fn write_timeout(&self) -> io::Result<Option<Duration>>; // ok
fn peek(&self, buf: &mut [u8]) -> io::Result<usize>; // ok
fn set_nodelay(&self, nodelay: bool) -> io::Result<()>; // implement an empty api.
fn nodelay(&self) -> io::Result<bool>; //
fn set_linger(&self, linger: Option<Duration>) -> io::Result<()>; // ok
fn linger(&self) -> io::Result<Option<Duration>>; // ok
I am willing to help.
There are many functions need to implemented for TcpListener and TcpStream. We need to implement as many as possible, so that
wasmedge_wasi_socket
can be a substitute of std version.Here is the list of them:
TcpListener:
TcpStream: