Pawl icon indicating copy to clipboard operation
Pawl copied to clipboard

Sending binary messages

Open atyachin opened this issue 3 years ago • 0 comments

I couldn't find a sample in the docs/Readme on how to send binary data. This is one way of doing this:

$buffer = "\x63\x7c\x77\x7b\xf2\x6b\x6f\xc5\x30\x01";     // just a sample
$conn->send(new \Ratchet\RFC6455\Messaging\Frame($buffer, true, \Ratchet\RFC6455\Messaging\Frame::OP_BINARY));

atyachin avatar Jul 17 '21 09:07 atyachin