Struct nat_traversal::SimpleUdpHolePunchServer
[−]
[src]
pub struct SimpleUdpHolePunchServer<T: AsRef<MappingContext>> { // some fields omitted }
RAII type for a hole punch server which speaks the simple hole punching protocol.
Methods
impl<T: AsRef<MappingContext>> SimpleUdpHolePunchServer<T>
[src]
fn new(mapping_context: T, deadline: Instant) -> WResult<SimpleUdpHolePunchServer<T>, 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.