[−][src]Struct async_socks5::SocksDatagram
A UDP socket that sends packets through a proxy.
Implementations
impl<S> SocksDatagram<S> where
S: AsyncWriteExt + AsyncReadExt + Send + Unpin, [src]
S: AsyncWriteExt + AsyncReadExt + Send + Unpin,
pub async fn associate<A>(
__arg0: S,
socket: UdpSocket,
auth: Option<Auth>,
association_addr: Option<A>
) -> Result<Self> where
A: Into<AddrKind>, [src]
__arg0: S,
socket: UdpSocket,
auth: Option<Auth>,
association_addr: Option<A>
) -> Result<Self> where
A: Into<AddrKind>,
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]
&'_ mut self,
buf: &'_ [u8],
addr: A
) -> Result<usize> where
A: Into<AddrKind>,
pub async fn recv_from<'_, '_>(
&'_ mut self,
buf: &'_ mut [u8]
) -> Result<(usize, AddrKind)>[src]
&'_ mut self,
buf: &'_ mut [u8]
) -> Result<(usize, AddrKind)>
pub fn split(self) -> (SocksDatagramRecvHalf<S>, SocksDatagramSendHalf<S>)[src]
Splits SocksDatagram into two halves to send and receive data concurrently
pub fn reunite(
recv: SocksDatagramRecvHalf<S>,
send: SocksDatagramSendHalf<S>
) -> Result<Self, (SocksDatagramSendHalf<S>, SocksDatagramRecvHalf<S>)> where
S: Debug, [src]
recv: SocksDatagramRecvHalf<S>,
send: SocksDatagramSendHalf<S>
) -> Result<Self, (SocksDatagramSendHalf<S>, SocksDatagramRecvHalf<S>)> where
S: Debug,
Tries to recover SocksDatagram from two halves.
Succeeds if halves are from the same call to SocksDatagram::split.
Trait Implementations
Auto Trait Implementations
impl<S> !RefUnwindSafe for SocksDatagram<S>
impl<S> Send for SocksDatagram<S> where
S: Send,
S: Send,
impl<S> Sync for SocksDatagram<S> where
S: Sync,
S: Sync,
impl<S> Unpin for SocksDatagram<S> where
S: Unpin,
S: Unpin,
impl<S> !UnwindSafe for SocksDatagram<S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,