Struct nat_traversal::PunchedUdpSocket [] [src]

pub struct PunchedUdpSocket {
    pub socket: UdpSocket,
    pub peer_addr: SocketAddr,
}

A udp socket that has been hole punched.

Fields

socket: UdpSocket

The UDP socket.

peer_addr: SocketAddr

The remote address that this socket is able to send messages to and receive messages from.

Methods

impl PunchedUdpSocket
[src]

fn punch_hole(socket: UdpSocket, our_priv_rendezvous_info: PrivRendezvousInfo, their_pub_rendezvous_info: PubRendezvousInfo) -> WResult<PunchedUdpSocket, UdpPunchHoleWarning, UdpPunchHoleError>

Punch a udp socket using a mapped socket and the peer's rendezvous info.