Struct socks5_proto::HandshakeRequest
source · pub struct HandshakeRequest {
pub methods: Vec<HandshakeMethod>,
}Expand description
SOCKS5 handshake request
+-----+----------+----------+
| VER | NMETHODS | METHODS |
+-----+----------+----------+
| 1 | 1 | 1 to 255 |
+-----+----------+----------|
Fields§
§methods: Vec<HandshakeMethod>Implementations§
source§impl HandshakeRequest
impl HandshakeRequest
pub fn new(methods: Vec<HandshakeMethod>) -> Self
pub async fn read_from<R>(r: &mut R) -> Result<Self>where
R: AsyncRead + Unpin,
pub async fn write_to<W>(&self, w: &mut W) -> Result<()>where
W: AsyncWrite + Unpin,
pub fn write_to_buf<B: BufMut>(&self, buf: &mut B)
pub fn serialized_len(&self) -> usize
Trait Implementations§
source§impl Clone for HandshakeRequest
impl Clone for HandshakeRequest
source§fn clone(&self) -> HandshakeRequest
fn clone(&self) -> HandshakeRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more