Enum tor_socksproto::handshake::client::State
source · enum State {
Initial,
Socks4Wait,
Socks5AuthWait,
Socks5UsernameWait,
Socks5Wait,
Done,
Failed,
}
Available on crate feature
client-handshake
only.Expand description
An internal state for a SocksClientHandshake
.
Variants§
Initial
We have sent nothing yet.
Socks4Wait
We have sent a SOCKS4 request, and are waiting for a response.
Socks5AuthWait
We have sent a SOCKS5 init message, and are waiting to hear what kind of authentication to use.
Socks5UsernameWait
We have sent a SOCKS5 username/password, and are waiting to hear whether it’s accepted.
Socks5Wait
We have sent a SOCKS5 request, and are waiting for a response.
Done
We have received the final reply from the proxy. This reply may be
successful or unsuccessful, depending on the value of
SocksClientHandshake::status
.
Failed
The handshake has failed and no further progress can be made.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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