Pawl
Pawl copied to clipboard
Sending binary messages
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));