Struct tokio_socks::tcp::socks4::Socks4Connector
source · pub struct Socks4Connector<'a, 't, S> { /* private fields */ }
Expand description
A Future
which resolves to a socket to the target server through proxy.
Implementations§
source§impl<'a, 't, S> Socks4Connector<'a, 't, S>
impl<'a, 't, S> Socks4Connector<'a, 't, S>
sourcepub async fn execute(&mut self) -> Result<Socks4Stream<TcpStream>>
pub async fn execute(&mut self) -> Result<Socks4Stream<TcpStream>>
Connect to the proxy server, authenticate and issue the SOCKS command
pub async fn execute_with_socket<T: AsyncSocket + Unpin>( &mut self, socket: T, ) -> Result<Socks4Stream<T>>
Auto Trait Implementations§
impl<'a, 't, S> Freeze for Socks4Connector<'a, 't, S>where
S: Freeze,
impl<'a, 't, S> RefUnwindSafe for Socks4Connector<'a, 't, S>where
S: RefUnwindSafe,
impl<'a, 't, S> Send for Socks4Connector<'a, 't, S>where
S: Send,
impl<'a, 't, S> Sync for Socks4Connector<'a, 't, S>where
S: Sync,
impl<'a, 't, S> Unpin for Socks4Connector<'a, 't, S>where
S: Unpin,
impl<'a, 't, S> UnwindSafe for Socks4Connector<'a, 't, S>where
S: UnwindSafe,
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more