Struct socks5_server::connection::IncomingConnection
source · pub struct IncomingConnection { /* private fields */ }Expand description
A Incoming connection. This may not be a valid socks5 connection. You need to call handshake() to perform the socks5 handshake. It will be converted to a proper socks5 connection after the handshake succeeds.
Implementations§
source§impl IncomingConnection
impl IncomingConnection
sourcepub async fn handshake(self) -> Result<Connection>
pub async fn handshake(self) -> Result<Connection>
Perform the socks5 handshake on this connection.
sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
Returns the local address that this stream is bound to.
sourcepub fn peer_addr(&self) -> Result<SocketAddr>
pub fn peer_addr(&self) -> Result<SocketAddr>
Returns the remote address that this stream is connected to.