Struct socks5_server::connection::associate::Associate
source · [−]pub struct Associate<S> { /* private fields */ }Expand description
Socks5 connection type Associate
AssociateUdpSocket can be used as the associated UDP socket.
Implementations
sourceimpl Associate<NeedReply>
impl Associate<NeedReply>
sourcepub async fn reply(
self,
reply: Reply,
addr: Address
) -> Result<Associate<Ready>>
pub async fn reply(
self,
reply: Reply,
addr: Address
) -> Result<Associate<Ready>>
Reply the associated UDP socket address to the client.
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.
sourceimpl Associate<Ready>
impl Associate<Ready>
sourcepub async fn wait_until_closed(&mut self) -> Result<()>
pub async fn wait_until_closed(&mut self) -> Result<()>
Wait until the client closes this TCP connection.
Socks5 protocol defines that when the client closes the TCP connection used to send the associate command, the server should release the associated UDP socket.
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<S> RefUnwindSafe for Associate<S> where
S: RefUnwindSafe,
impl<S> Send for Associate<S> where
S: Send,
impl<S> Sync for Associate<S> where
S: Sync,
impl<S> Unpin for Associate<S> where
S: Unpin,
impl<S> UnwindSafe for Associate<S> where
S: UnwindSafe,
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