add 'network.find_free_port' function
This commit is contained in:
@@ -40,6 +40,8 @@ namespace network {
|
||||
int port,
|
||||
const ServerDatagramCallback& handler
|
||||
);
|
||||
|
||||
int find_free_port();
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +92,10 @@ Server* Network::getServer(u64id_t id, bool includePrivate) const {
|
||||
return found->second.get();
|
||||
}
|
||||
|
||||
int Network::findFreePort() const {
|
||||
return find_free_port();
|
||||
}
|
||||
|
||||
u64id_t Network::connectTcp(
|
||||
const std::string& address,
|
||||
int port,
|
||||
|
||||
Reference in New Issue
Block a user