Struct socks5_impl::server::connection::IncomingConnection
source · pub struct IncomingConnection { /* private fields */ }
Expand description
An 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.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for IncomingConnection
impl Send for IncomingConnection
impl Sync for IncomingConnection
impl Unpin for IncomingConnection
impl !UnwindSafe for IncomingConnection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more