pub struct Request {
pub command: Command,
pub address: Address,
}Expand description
SOCKS5 request
+-----+-----+-------+------+----------+----------+
| VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |
+-----+-----+-------+------+----------+----------+
| 1 | 1 | X'00' | 1 | Variable | 2 |
+-----+-----+-------+------+----------+----------+Fields§
§command: Command§address: AddressImplementations§
Source§impl Request
impl Request
pub const fn new(command: Command, address: Address) -> Self
pub async fn read_from<R>(r: &mut R) -> Result<Self, Error>
pub async fn write_to<W>(&self, w: &mut W) -> Result<(), IoError>where
W: AsyncWrite + Unpin,
pub fn write_to_buf<B: BufMut>(&self, buf: &mut B)
pub fn serialized_len(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
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