Struct tokio_socks::tcp::SocksConnector
source · [−]pub struct SocksConnector<'a, 't, S> { /* private fields */ }
Expand description
A Future
which resolves to a socket to the target server through proxy.
Implementations
sourceimpl<'a, 't, S> SocksConnector<'a, 't, S> where
S: Stream<Item = Result<SocketAddr>> + Unpin,
impl<'a, 't, S> SocksConnector<'a, 't, S> where
S: Stream<Item = Result<SocketAddr>> + Unpin,
sourcepub async fn execute(&mut self) -> Result<Socks5Stream<TcpStream>>
pub async fn execute(&mut self) -> Result<Socks5Stream<TcpStream>>
Connect to the proxy server, authenticate and issue the SOCKS command
pub async fn execute_with_socket<T: AsyncRead + AsyncWrite + Unpin>(
&mut self,
socket: T
) -> Result<Socks5Stream<T>>
Auto Trait Implementations
impl<'a, 't, S> RefUnwindSafe for SocksConnector<'a, 't, S> where
S: RefUnwindSafe,
impl<'a, 't, S> Send for SocksConnector<'a, 't, S> where
S: Send,
impl<'a, 't, S> Sync for SocksConnector<'a, 't, S> where
S: Sync,
impl<'a, 't, S> Unpin for SocksConnector<'a, 't, S> where
S: Unpin,
impl<'a, 't, S> UnwindSafe for SocksConnector<'a, 't, 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