mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
UDP Sokcet port blocking exit
This commit is contained in:
parent
bab3b8274a
commit
e2b68a01d1
@ -31,6 +31,10 @@ class MinecraftInterface{
|
||||
private $data;
|
||||
function __construct($server, $port = 25565, $listen = false, $client = false, $serverip = "0.0.0.0"){
|
||||
$this->socket = new UDPSocket($server, $port, (bool) $listen, $serverip);
|
||||
if($this->socket->connected === false){
|
||||
console("[ERROR] Couldn't bind to $serverip:".$port, true, true, 0);
|
||||
exit(1);
|
||||
}
|
||||
$this->client = (bool) $client;
|
||||
$this->start = microtime(true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user