public function send($command, $data)
    {
        $message = new Message;

        $message->command = $command;
        $message->data = $data;

        $this->connection->send($message->serialize());
    }