public function openSession(Session $session) { $data = chr(self::PACKET_OPEN_SESSION) . Binary::writeInt($session->getID()) . chr(strlen($session->getAddress())) . $session->getAddress() . Binary::writeShort($session->getPort()); $this->thread->pushThreadToMainPacket($data); }
protected function putShort($v) { $this->buffer .= Binary::writeShort($v); }