mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'network.find_free_port' function
This commit is contained in:
parent
5b3e88bbf1
commit
1f1cb22e4d
4 changed files with 34 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue