Struct p2p::UdpRendezvousServer [−][src]
pub struct UdpRendezvousServer { /* fields omitted */ }
Traversal server implementation for UDP. Acts much like STUN server except doesn't implement the standard protocol - RFC 5389.
Methods
impl UdpRendezvousServer
[src]
impl UdpRendezvousServer
pub fn from_socket(
socket: UdpSocket,
handle: &Handle
) -> Result<UdpRendezvousServer>
[src]
pub fn from_socket(
socket: UdpSocket,
handle: &Handle
) -> Result<UdpRendezvousServer>
Takes ownership of already set up UDP socket and starts rendezvous server.
pub fn bind(addr: &SocketAddr, handle: &Handle) -> Result<UdpRendezvousServer>
[src]
pub fn bind(addr: &SocketAddr, handle: &Handle) -> Result<UdpRendezvousServer>
Start listening for incoming connections.
pub fn bind_reusable(
addr: &SocketAddr,
handle: &Handle
) -> Result<UdpRendezvousServer>
[src]
pub fn bind_reusable(
addr: &SocketAddr,
handle: &Handle
) -> Result<UdpRendezvousServer>
Start listening for incoming connection and allow other sockets to bind to the same port.
pub fn bind_public(
addr: &SocketAddr,
handle: &Handle,
mc: &P2p
) -> BoxFuture<(UdpRendezvousServer, SocketAddr), BindPublicError>
[src]
pub fn bind_public(
addr: &SocketAddr,
handle: &Handle,
mc: &P2p
) -> BoxFuture<(UdpRendezvousServer, SocketAddr), BindPublicError>
Try to get an external address and start listening for incoming connections.
pub fn local_addr(&self) -> SocketAddr
[src]
pub fn local_addr(&self) -> SocketAddr
Returns the local address that this rendezvous server is bound to.
pub fn expanded_local_addrs(&self) -> Result<Vec<SocketAddr>>
[src]
pub fn expanded_local_addrs(&self) -> Result<Vec<SocketAddr>>
Returns all local addresses of this rendezvous server, expanding the unspecified address into a vector of all local interface addresses.
pub fn public_key(&self) -> PublicKey
[src]
pub fn public_key(&self) -> PublicKey
Returns server public key. Server expects incoming messages to be encrypted with this public key.
Auto Trait Implementations
impl Send for UdpRendezvousServer
impl Send for UdpRendezvousServer
impl Sync for UdpRendezvousServer
impl Sync for UdpRendezvousServer