Function hole_punch_connect::server::run

source ·
pub fn run(port: u16) -> Result<(), Error>
Expand description

Use this function if you want to run a standard server which waits for two clients to send the same identification packet, then sends the clients’ IP address and external port number to each other. It also has some basic protection against someone trying to overload the server by sending multiple packages from the same ip. If you want something more customisable, take a look at make_match,

Errors

This function returns immediately with any std::io::Error that comes up.