[][src]Struct async_socks5::SocksDatagram

pub struct SocksDatagram<S> { /* fields omitted */ }

A UDP socket that sends packets through a proxy.

Methods

impl<S> SocksDatagram<S> where
    S: AsyncWriteExt + AsyncReadExt + Send + Unpin
[src]

pub async fn associate<A>(
    __arg0: S,
    socket: UdpSocket,
    auth: Option<Auth>,
    association_addr: Option<A>
) -> Result<Self> where
    A: Into<AddrKind>, 
[src]

Creates SocksDatagram. Performs UDP ASSOCIATE under the hood.

pub fn proxy_addr(&self) -> &AddrKind[src]

pub fn get_ref(&self) -> &UdpSocket[src]

pub fn get_mut(&mut self) -> &mut UdpSocket[src]

pub fn into_inner(self) -> (S, UdpSocket)[src]

pub async fn send_to<'_, '_, A>(
    &'_ mut self,
    buf: &'_ [u8],
    addr: A
) -> Result<usize> where
    A: Into<AddrKind>, 
[src]

pub async fn recv_from<'_, '_>(
    &'_ mut self,
    buf: &'_ mut [u8]
) -> Result<(usize, AddrKind)>
[src]

Trait Implementations

impl<S: Debug> Debug for SocksDatagram<S>[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for SocksDatagram<S>

impl<S> Send for SocksDatagram<S> where
    S: Send

impl<S> Sync for SocksDatagram<S> where
    S: Sync

impl<S> Unpin for SocksDatagram<S> where
    S: Unpin

impl<S> !UnwindSafe for SocksDatagram<S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.