Function socks5_write_udp_header
Source pub fn socks5_write_udp_header(
address: &Address,
buf: &mut [u8],
) -> Result<usize>
Available on crate feature socks5 only.
Expand description
Writes the SOCKS5 UDP header and destination address into a buffer.
§Arguments
address - The destination address to encode
buf - A mutable buffer slice to write the UDP header into
§Returns
Result<usize> - On success, returns the total header length written in bytes,
or an IO error on failure