/** * Get Control Packet Type * * @return int */ public function getMessageType() { return $this->message->getMessageType(); }
/** * Write Message Object * * @param Message\Base $object * @param int & $length * @return int * @throws Exception */ protected function message_write(Base $object, &$length = 0) { Debug::Log(Debug::DEBUG, 'Message write: message_type=' . Message::$name[$object->getMessageType()]); $length = 0; $message = $object->build($length); $bytes_written = $this->socket->write($message, $length); return $bytes_written; }