pub struct Request {
pub username: Vec<u8>,
pub password: Vec<u8>,
}
Expand description
SOCKS5 password handshake request
+-----+------+----------+------+----------+
| VER | ULEN | UNAME | PLEN | PASSWD |
+-----+------+----------+------+----------+
| 1 | 1 | 1 to 255 | 1 | 1 to 255 |
+-----+------+----------+------+----------+
Fields§
§username: Vec<u8>
§password: Vec<u8>
Implementations§
source§impl Request
impl Request
pub fn new(username: Vec<u8>, password: Vec<u8>) -> Self
pub async fn from_stream<R: AsyncRead + Unpin>(r: &mut R) -> Result<Self>
pub async fn write_to<W: AsyncWrite + Unpin>(&self, w: &mut W) -> Result<()>
pub fn write_to_buf<B: BufMut>(&self, buf: &mut B)
pub fn serialized_len(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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