lib/SteamCondenser/Servers/Sockets/GoldSrcSocket.php
public function getReply() {
        $bytesRead = $this->receivePacket(1400);

        if($this->buffer->getLong() == -2) {
            do {
                $requestId = $this->buffer->getLong();
                $packetCountAndNumber = $this->buffer->getByte();
                $packetCount = $packetCountAndNumber & 0xF;
                $packetNumber = ($packetCountAndNumber >> 4) + 1;

                $splitPackets[$packetNumber - 1] = $this->buffer->get();

                $this->logger->debug("Received packet $packetNumber of $packetCount for request #$requestId");

                if(sizeof($splitPackets) < $packetCount) {
                    try {
                        $bytesRead = $this->receivePacket();
                    } catch(\SteamCondenser\Exceptions\TimeoutException $e) {
                        $bytesRead = 0;
                    }
                } else {
                    $bytesRead = 0;
                }
            } while($bytesRead > 0 && $this->buffer->getLong() == -2);

            $packet = SteamPacketFactory::reassemblePacket($splitPackets);
        } else {
            $packet = SteamPacketFactory::getPacketFromData($this->buffer->get());
        }

        $this->logger->debug("Received packet of type \"" . get_class($packet) . "\"");

        return $packet;
    }
public function getReply() {
        $bytesRead = $this->receivePacket(1400);

        if($this->buffer->getLong() == -2) {
            do {
                $requestId = $this->buffer->getLong();
                $packetCountAndNumber = $this->buffer->getByte();
                $packetCount = $packetCountAndNumber & 0xF;
                $packetNumber = ($packetCountAndNumber >> 4) + 1;

                $splitPackets[$packetNumber - 1] = $this->buffer->get();

                $this->logger->debug("Received packet $packetNumber of $packetCount for request #$requestId");

                if(sizeof($splitPackets) < $packetCount) {
                    try {
                        $bytesRead = $this->receivePacket();
                    } catch(\SteamCondenser\Exceptions\TimeoutException $e) {
                        $bytesRead = 0;
                    }
                } else {
                    $bytesRead = 0;
                }
            } while($bytesRead > 0 && $this->buffer->getLong() == -2);

            $packet = SteamPacketFactory::reassemblePacket($splitPackets);
        } else {
            $packet = SteamPacketFactory::getPacketFromData($this->buffer->get());
        }

        $this->logger->debug("Received packet of type \"" . get_class($packet) . "\"");

        return $packet;
    }
Reads a packet from the socket

The Source query protocol specifies a maximum packet size of 1,400
bytes. Bigger packets will be split over several UDP packets. This
method reassembles split packets into single packet objects.

@return \SteamCondenser\Servers\Packets\SteamPacket The packet replied
from the server