You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the wrapper is amazing but I have a question about the _sendEvent function (line 249). I'm trying to implement the same wrapper for this flutter websocket plugin and looking at the raw data sent by your wrapper I noticed the key "a" on the object that will be sent to the other end of the socket. Why is that? I tried removing it and stringify the args object directly also works. Moreover removing it will make it easier for my to parse it on flutter.
Yes, the wrapper does support binary data, and it simply ignores any message that is invalid JSON.
From the docs:
If the message received by the WebSocket is not valid JSON or if the parsed Object does not match one of the above message types, then the message is simply ignored by ws-wrapper. Also if the JSON message contains a ws-wrapper property with the value false, the message will be ignored. This allows other libraries to use the same WebSocket and send messages that will not be processed by ws-wrapper.
Hi, the wrapper is amazing but I have a question about the
_sendEvent
function (line249
). I'm trying to implement the same wrapper for this flutter websocket plugin and looking at the raw data sent by your wrapper I noticed the key"a"
on the object that will be sent to the other end of the socket. Why is that? I tried removing it and stringify theargs
object directly also works. Moreover removing it will make it easier for my to parse it on flutter.Thank you!
ws-wrapper/lib/wrapper.js
Lines 247 to 252 in 0e544c6
The text was updated successfully, but these errors were encountered: