pub struct TcpConnecter(/* private fields */);Expand description
A utility for making TCP connections.
See PoolExt::tcp_connecter for details.
Implementations§
Source§impl TcpConnecter
impl TcpConnecter
Sourcepub fn connect_into_tcp_stream(&self, socket: TcpListener) -> Result<TcpStream>
pub fn connect_into_tcp_stream(&self, socket: TcpListener) -> Result<TcpStream>
Initiate a TCP connection, converting a TcpListener to a
TcpStream.
This is simlar to Pool::connect_tcp_stream in that it performs a
TCP connection, but instead of creating a new socket itself it takes a
TcpListener, such as one created with TcpListenerExt::new.
Despite the name, this function uses the TcpListener type as a
generic socket container.
This is similar to PoolExt::connect_into_tcp_stream except that
it uses a TcpConnecter which contains addresses that have already
been checked against a Pool.
Sourcepub fn connect_existing_tcp_listener(&self, socket: &TcpListener) -> Result<()>
pub fn connect_existing_tcp_listener(&self, socket: &TcpListener) -> Result<()>
Initiate a TCP connection on a socket.
This is simlar to Pool::connect_into_tcp_stream, however instead of
converting a TcpListener to a TcpStream, it leaves fd in the
existing TcpListener.
This is similar to PoolExt::connect_existing_tcp_listener except
that it uses a TcpConnecter which contains addresses that have
already been checked against a Pool.