-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary messages? #6
Comments
@dtracers right now there is no native support for binary messages but it will be on of the next things I work on adding. |
+1 |
I use protobuf.js. So a good example test might be sending a hello world protobuf file via I don't think I'll be able to come up with one until this weekend. And
|
I don't know if something changed in the meantime, but this works:
|
It seems to work as long as you consistently use If you send a server.on('connection', socket => {
socket.on('message', (msg) => {
const encodedAsNodeBuffer = myBufferGenerator();
const newBuffer = new ArrayBuffer(encodedAsNodeBuffer.byteLength);
const newBufferView = new Uint8Array(newBuffer);
newBufferView.set(encodedAsNodeBuffer, 0);
socket.send(newBuffer);
}
} The protobufjs code generator seems to use |
I could not find anything about it supporting binary messages. Does this library support mocking of binary messages?
The text was updated successfully, but these errors were encountered: