Struct socks::Socks5Datagram [] [src]

pub struct Socks5Datagram { /* fields omitted */ }

A SOCKS5 UDP client.

Methods

impl Socks5Datagram
[src]

Creates a UDP socket bound to the specified address which will have its traffic routed through the specified proxy.

Like UdpSocket::send_to.

Note

The SOCKS protocol inserts a header at the beginning of the message. The header will be 10 bytes for an IPv4 address, 22 bytes for an IPv6 address, and 7 bytes plus the length of the domain for a domain address.

Like UdpSocket::recv_from.

Returns the address of the proxy-side UDP socket through which all messages will be routed.

Returns a shared reference to the inner socket.

Returns a mutable reference to the inner socket.

Trait Implementations

impl Debug for Socks5Datagram
[src]

Formats the value using the given formatter.