Fix: pass Buffer data type as ArrayBuffer instead of string#365
Fix: pass Buffer data type as ArrayBuffer instead of string#365yannbriancon wants to merge 2 commits intothoov:masterfrom
Conversation
|
Buffer is a Node module, but this library is supposed to mock the client web socket and is not supposed to create a copy of the Node WebSocket implementation (Anyway the server can be written in any language). |
|
Meet the same problem, we use some external npm package which will generate Buffer and we transfer them by the websocket. |
|
@bytemain Can you share an example of the issue? |
From what I experienced with web sockets, Buffer messages are transmitted as ArrayBuffer in the message event.
This modification may break some people implementations but should be closer to real behaviour.
Happy to have your feedback.