[−][src]Trait new_home_application::net::tcp_server::TcpServer
The interface which wraps around the std::net::TcpListener
and adapts the TcpReader
and
TcpWriter
object to the std::net::*
objects to simplify the usage of networking in unit tests
Required methods
fn bind(&mut self)
Binds the TcpListener to the given ip and port.
fn get_tcp_stream(
&self
) -> Result<(Box<dyn TcpWriter>, Box<dyn TcpReader>), Error>
&self
) -> Result<(Box<dyn TcpWriter>, Box<dyn TcpReader>), Error>
Accepts a client connections.
Returns a TcpWriter
and a TcpReader
connected to the std::net::TcpStream
of the connected client