Struct nat_traversal::SimpleTcpHolePunchServer
[−]
[src]
pub struct SimpleTcpHolePunchServer<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>> SimpleTcpHolePunchServer<T>
[src]
fn new(mapping_context: T, deadline: Instant) -> WResult<SimpleTcpHolePunchServer<T>, MappedTcpSocketMapWarning, SimpleTcpHolePunchServerNewError>
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.