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
Sending binary data returns client error (chrome) "WebSocket connection to 'ws://127.0.0.1:8008' failed: Could not decode a text frame as UTF-8." How can i force relay to use binary websocket frames?
The text was updated successfully, but these errors were encountered:
Have you tried setting binaryType = 'arraybuffer' on your WebSocket? I suspect this may be a client-side issue rather than a problem with ws-tcp-relay (it just uses io.Copy).
Client side sends all data as binary for sure. My suspicion is that tcp-ws side is at fault. As it incorrectly sends binary data as text frame. So browser can't decode it as string. Anyways I switched to https://github.com/herenow/wsProxy and it works without problems.
Oh, you're totally right, golang.org/x/net/websocket defaults to sending payloads as text frames (in func (*Conn) Write). I will have to add an option to use binary frames instead.
Sending binary data returns client error (chrome) "WebSocket connection to 'ws://127.0.0.1:8008' failed: Could not decode a text frame as UTF-8." How can i force relay to use binary websocket frames?
The text was updated successfully, but these errors were encountered: