add 'network.find_free_port' function

This commit is contained in:
MihailRis
2025-11-15 16:18:34 +03:00
parent 5b3e88bbf1
commit 1f1cb22e4d
4 changed files with 34 additions and 0 deletions
+6
View File
@@ -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,