Struct socks5_server::connection::IncomingConnection
source · [−]pub struct IncomingConnection { /* private fields */ }Expand description
Incoming connection. This may not be a valid socks5 connection, so you need to call handshake() to perform the socks5 handshake, then it will be converted to a proper socks5 connection.
Implementations
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more