Allow binding to an specific IP

This commit is contained in:
Shoghi Cervantes Pueyo
2013-02-04 22:37:56 +01:00
parent 6839001dc3
commit ac6c3c7e69
4 changed files with 11 additions and 9 deletions

View File

@ -32,8 +32,8 @@ class MinecraftInterface{
var $dataName;
private $socket;
private $data;
function __construct($server, $port = 25565, $listen = false, $client = true){
$this->socket = new UDPSocket($server, $port, (bool) $listen);
function __construct($server, $port = 25565, $listen = false, $client = false, $serverip = "0.0.0.0"){
$this->socket = new UDPSocket($server, $port, (bool) $listen, $serverip);
require("protocol/RakNet.php");
require("protocol/packetName.php");
require("protocol/current.php");