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