function sendMessageToPool(\CharlotteDunois\Phoebe\Message $message) {
        if(static::$socket) {
            $data = \CharlotteDunois\Phoebe\Socket::encodeMessage($message);
            static::$socket->write($data);
        } else {
            $this->messagesOut[] = $message;
        }
    }