/**
  *
  */
 public function __construct($data)
 {
     parent::__construct(SteamPacket::S2A_INFO2_HEADER, $data);
     $this->networkVersion = $this->contentData->getByte();
     $this->serverName = $this->contentData->getString();
     $this->mapName = $this->contentData->getString();
     $this->gameDir = $this->contentData->getString();
     $this->gameDesc = $this->contentData->getString();
     $this->appId = $this->contentData->getShort();
     $this->playerNumber = $this->contentData->getByte();
     $this->maxPlayers = $this->contentData->getByte();
     $this->botNumber = $this->contentData->getByte();
     $this->dedicated = chr($this->contentData->getByte());
     $this->operatingSystem = chr($this->contentData->getByte());
     $this->passwordProtected = $this->contentData->getByte() == 1;
     $this->secureServer = $this->contentData->getByte() == 1;
     $this->gameVersion = $this->contentData->getString();
     if ($this->contentData->remaining() > 0) {
         $extraDataFlag = $this->contentData->getByte();
         if ($extraDataFlag & 0x80) {
             $this->serverPort = $this->contentData->getShort();
         }
         if ($extraDataFlag & 0x10) {
             $this->serverId = $this->contentData->getUnsignedLong() | $this->contentData->getUnsignedLong() << 32;
         }
         if ($extraDataFlag & 0x40) {
             $this->tvPort = $this->contentData->getShort();
             $this->tvName = $this->contentData->getString();
         }
         if ($extraDataFlag & 0x20) {
             $this->serverTags = $this->contentData->getString();
         }
     }
 }
 public function __construct($data)
 {
     parent::__construct(SteamPacket::S2A_INFO_DETAILED_HEADER, $data);
     $this->serverIp = $this->contentData->getString();
     $this->serverName = $this->contentData->getString();
     $this->mapName = $this->contentData->getString();
     $this->gameDir = $this->contentData->getString();
     $this->gameDescription = $this->contentData->getString();
     $this->numberOfPlayers = $this->contentData->getByte();
     $this->maxPlayers = $this->contentData->getByte();
     $this->networkVersion = $this->contentData->getByte();
     $this->dedicated = $this->contentData->getByte();
     $this->operatingSystem = $this->contentData->getByte();
     $this->passwordProtected = $this->contentData->getByte() == 1;
     $this->isMod = $this->contentData->getByte() == 1;
     if ($this->isMod) {
         $this->modInfo["urlInfo"] = $this->contentData->getString();
         $this->modInfo["urlDl"] = $this->contentData->getString();
         $this->contentData->getByte();
         if ($this->contentData->remaining() == 12) {
             $this->modInfo["modVersion"] = $this->contentData->getLong();
             $this->modInfo["modSize"] = $this->contentData->getLong();
             $this->modInfo["svOnly"] = $this->contentData->getByte() == 1;
             $this->modInfo["clDll"] = $this->contentData->getByte() == 1;
             $this->secure = $this->contentData->getByte() == 1;
             $this->numberOfBots = $this->contentData->getByte();
         }
     } else {
         $this->secure = $this->contentData->getByte() == 1;
         $this->numberOfBots = $this->contentData->getByte();
     }
 }
 /**
  * Creates a new S2A_INFO_DETAILED response object based on the given data
  *
  * @param string $data The raw packet data replied from the server
  */
 public function __construct($data)
 {
     parent::__construct(SteamPacket::S2A_INFO_DETAILED_HEADER, $data);
     $this->info['serverIp'] = $this->contentData->getString();
     $this->info['serverName'] = $this->contentData->getString();
     $this->info['mapName'] = $this->contentData->getString();
     $this->info['gameDir'] = $this->contentData->getString();
     $this->info['gameDescription'] = $this->contentData->getString();
     $this->info['numberOfPlayers'] = $this->contentData->getByte();
     $this->info['maxPlayers'] = $this->contentData->getByte();
     $this->info['networkVersion'] = $this->contentData->getByte();
     $this->info['dedicated'] = $this->contentData->getByte();
     $this->info['operatingSystem'] = $this->contentData->getByte();
     $this->info['passwordProtected'] = $this->contentData->getByte() == 1;
     $this->info['isMod'] = $this->contentData->getByte() == 1;
     if ($this->isMod) {
         $this->info['modInfo']['urlInfo'] = $this->contentData->getString();
         $this->info['modInfo']['urlDl'] = $this->contentData->getString();
         $this->contentData->getByte();
         if ($this->contentData->remaining() == 12) {
             $this->info['modInfo']['modVersion'] = $this->contentData->getLong();
             $this->info['modInfo']['modSize'] = $this->contentData->getLong();
             $this->info['modInfo']['svOnly'] = $this->contentData->getByte() == 1;
             $this->info['modInfo']['clDll'] = $this->contentData->getByte() == 1;
             $this->info['secure'] = $this->contentData->getByte() == 1;
             $this->info['numberOfBots'] = $this->contentData->getByte();
         }
     } else {
         $this->info['secure'] = $this->contentData->getByte() == 1;
         $this->info['numberOfBots'] = $this->contentData->getByte();
     }
 }
 /**
  * Creates a new S2A_INFO2 response object based on the given data
  *
  * @param string $data The raw packet data replied from the server
  */
 public function __construct($data)
 {
     parent::__construct(SteamPacket::S2A_INFO2_HEADER, $data);
     $this->info['networkVersion'] = $this->contentData->getByte();
     $this->info['serverName'] = $this->contentData->getString();
     $this->info['mapName'] = $this->contentData->getString();
     $this->info['gameDir'] = $this->contentData->getString();
     $this->info['gameDesc'] = $this->contentData->getString();
     $this->info['appId'] = $this->contentData->getShort();
     $this->info['numberOfPlayers'] = $this->contentData->getByte();
     $this->info['maxPlayers'] = $this->contentData->getByte();
     $this->info['botNumber'] = $this->contentData->getByte();
     $this->info['dedicated'] = chr($this->contentData->getByte());
     $this->info['operatingSystem'] = chr($this->contentData->getByte());
     $this->info['passwordProtected'] = $this->contentData->getByte() == 1;
     $this->info['secureServer'] = $this->contentData->getByte() == 1;
     $this->info['gameVersion'] = $this->contentData->getString();
     if ($this->contentData->remaining() > 0) {
         $extraDataFlag = $this->contentData->getByte();
         if ($extraDataFlag & self::EDF_GAME_PORT) {
             $this->info['serverPort'] = $this->contentData->getShort();
         }
         if ($extraDataFlag & self::EDF_SERVER_ID) {
             $this->info['serverId'] = $this->contentData->getUnsignedLong() | $this->contentData->getUnsignedLong() << 32;
         }
         if ($extraDataFlag & self::EDF_SOURCE_TV) {
             $this->info['tvPort'] = $this->contentData->getShort();
             $this->info['tvName'] = $this->contentData->getString();
         }
         if ($extraDataFlag & self::EDF_SERVER_TAGS) {
             $this->info['serverTags'] = $this->contentData->getString();
         }
         if ($extraDataFlag & self::EDF_GAME_ID) {
             $this->info['gameId'] = $this->contentData->getUnsignedLong() | $this->contentData->getUnsignedLong() << 32;
         }
     }
 }