Struct socks5_impl::protocol::UdpHeader
source · pub struct UdpHeader {
pub frag: u8,
pub address: Address,
}
Expand description
SOCKS5 UDP packet header
+-----+------+------+----------+----------+----------+
| RSV | FRAG | ATYP | DST.ADDR | DST.PORT | DATA |
+-----+------+------+----------+----------+----------+
| 2 | 1 | 1 | Variable | 2 | Variable |
+-----+------+------+----------+----------+----------+
Fields§
§frag: u8
§address: Address
Implementations§
source§impl UdpHeader
impl UdpHeader
pub fn new(frag: u8, address: Address) -> 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
pub const fn max_serialized_len() -> usize
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for UdpHeader
impl Send for UdpHeader
impl Sync for UdpHeader
impl Unpin for UdpHeader
impl UnwindSafe for UdpHeader
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