/** * Read a boolean from the socket. * * @return bool the boolean read */ protected function readBoolean() { $value = $this->socket->read(1); return (bool) Binary::unpackByte($value); }