/**
  * Creates a new UDP socket to communicate with the Source 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)
 {
     parent::__construct($ipAddress, $portNumber);
     if (!isset(self::$log)) {
         self::$log = new \Monolog\Logger('SourceSocket');
     }
 }
示例#2
0
 /**
  * Sends the given RCON packet to the server
  *
  * @param SteamPacket $dataPacket The RCON packet to send to the server
  */
 public function send(SteamPacket $dataPacket)
 {
     if (empty($this->socket) || !$this->socket->isOpen()) {
         $this->socket = new TCPSocket();
         $this->socket->connect($this->ipAddress, $this->portNumber, SteamSocket::$timeout);
     }
     parent::send($dataPacket);
 }
 /**
  * Creates a new 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
  * @param bool $isHLTV <var>true</var> if the target server is a HTLV
  *        instance. HLTV behaves slightly different for RCON commands, this
  *        flag increases compatibility.
  */
 public function __construct($ipAddress, $portNumber = 27015, $isHLTV = false)
 {
     parent::__construct($ipAddress, $portNumber);
     $this->isHLTV = $isHLTV;
     if (!isset(self::$log)) {
         self::$log = new \Monolog\Logger('GoldSrcSocket');
     }
 }
 /**
  * Creates a new UDP socket to communicate with the Source 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)
 {
     parent::__construct($ipAddress, $portNumber);
 }
 /**
  * Creates a new 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
  * @param bool $isHLTV <var>true</var> if the target server is a HTLV
  *        instance. HLTV behaves slightly different for RCON commands, this
  *        flag increases compatibility.
  */
 public function __construct($ipAddress, $portNumber = 27015, $isHLTV = false)
 {
     parent::__construct($ipAddress, $portNumber);
     $this->isHLTV = $isHLTV;
 }