Struct nat_traversal::SimpleUdpHolePunchServer
[−]
[src]
pub struct SimpleUdpHolePunchServer<'a> { // some fields omitted }
RAII type for a hole punch server which speaks the simple hole punching protocol.
Methods
impl<'a> SimpleUdpHolePunchServer<'a>
[src]
fn new(mapping_context: &'a MappingContext) -> WResult<SimpleUdpHolePunchServer<'a>, MappedUdpSocketMapWarning, SimpleUdpHolePunchServerNewError>
Create a new server. This will spawn a background thread which will serve requests until the server is dropped.
fn addresses(&self) -> Vec<SocketAddr>
Get the external addresses of this server to be shared with peers.