function prepareMessage(string $data): \Ratchet\RFC6455\Messaging\Message {
        $frame = new \Ratchet\RFC6455\Messaging\Frame($data, true, \Ratchet\RFC6455\Messaging\Frame::OP_BINARY);
        
        $msg = new \Ratchet\RFC6455\Messaging\Message();
        $msg->addFrame($frame);
        
        return $msg;
    }
function prepareMessage(string $data): \Ratchet\RFC6455\Messaging\Message {
        $frame = new \Ratchet\RFC6455\Messaging\Frame($data, true, \Ratchet\RFC6455\Messaging\Frame::OP_BINARY);
        
        $msg = new \Ratchet\RFC6455\Messaging\Message();
        $msg->addFrame($frame);
        
        return $msg;
    }
function prepareMessage ( string $ data ) : \ Ratchet \ RFC6455 \ Messaging \ Message { $ frame = new \ Ratchet \ RFC6455 \ Messaging \ Frame ( $ data , true , \ Ratchet \ RFC6455 \ Messaging \ Frame :: OP_BINARY ) ; $ msg = new \ Ratchet \ RFC6455 \ Messaging \ Message ( ) ; $ msg -> addFrame ( $ frame ) ; return $ msg ; }
Prepares the data to be sent.
@param string  $data
@return \Ratchet\RFC6455\Messaging\Message
Prepares the data to be sent .