[−][src]Struct socks::Socks4Listener
A SOCKS4 BIND client.
Implementations
impl Socks4Listener
[src]
pub fn bind<T, U>(proxy: T, target: U, userid: &str) -> Result<Socks4Listener> where
T: ToSocketAddrs,
U: ToTargetAddr,
[src]
T: ToSocketAddrs,
U: ToTargetAddr,
Initiates a BIND request to the specified proxy.
The proxy will filter incoming connections based on the value of
target
.
pub fn proxy_addr(&self) -> Result<SocketAddr>
[src]
The address of the proxy-side TCP listener.
This should be forwarded to the remote process, which should open a connection to it.
pub fn accept(self) -> Result<Socks4Stream>
[src]
Waits for the remote process to connect to the proxy server.
The value of proxy_addr
should be forwarded to the remote process
before this method is called.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Socks4Listener
impl Send for Socks4Listener
impl Sync for Socks4Listener
impl Unpin for Socks4Listener
impl UnwindSafe for Socks4Listener
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,
pub 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.
pub 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>,