To expand a little on the previous message.. Binary and text messages are treated the same way both on sending and receiving. The default message policies use std::string to hold outgoing messages and deliver incoming messages irregardless of opcode. For text messages validation is done to ensure the message is valid UTF8. For binary messages no processing at all is done and the incoming or outgoing string contains the raw message data.
Note that both the send method that takes a string and the one that takes a length and void pointer can be used to send messages of either opcode. Both are included so existing raw buffers can be sent with fewer copies on pre-c++11/rvalue reference compilers. Use whichever is more convenient for your data irrespective of the opcode you are using.
On the receiving side you can use std::string's data() method to get a raw pointer to the beginning of the binary data. The size() method will return the exact size of the binary data. There is no padding or headers or anything, just the original raw message in order byte for byte.
I'll see what I can do about including an example that uses binary messages.