Esempio n. 1
0
 /**
  * Creates a new UDP socket to communicate with the server on the given IP
  * address and port
  *
  * @param string $ipAddress Either the IP address or the DNS name of the
  *        server
  * @param int $portNumber The port the server is listening on
  */
 public function __construct($ipAddress, $portNumber = 27015)
 {
     if (!isset(self::$log)) {
         self::$log = new \Monolog\Logger('SteamSocket');
     }
     $this->socket = new UDPSocket();
     $this->socket->connect($ipAddress, $portNumber, 0);
 }
 /**
  * Creates a new UDP socket to communicate with the server on the given IP
  * address and port
  *
  * @param string $ipAddress Either the IP address or the DNS name of the
  *        server
  * @param int $portNumber The port the server is listening on
  */
 public function __construct($ipAddress, $portNumber = 27015)
 {
     $this->logger = \SteamCondenser\getLogger(get_class($this));
     $this->socket = new UDPSocket();
     $this->socket->connect($ipAddress, $portNumber, 0);
 }