FWIW, anyone else looking, this is what I have found so far:
The URL I connect to with a WebSocket: wss://chat-dev.torn.com/socket.io/?userId=<my user ID>&EIO=4&transport=websocket
This URL came from one of Torn's script loaded from it's builds/sendbird-chat directory. Also what I see in WireShark - the IP address, anyways. Haven't decoded the TLS yet.
This connects, and stays connected (I send pings, receive pongs)
My '.onmessage' handler for the websocket receives messages, but not JSON encoded, rather just text that looks like:
[image: imgur.com]So not quite to do with that. One prob may be I am directly using Node JS WebSockets; I haven't looked into the SendBird JS SDK much yet.
Edit: the string after the leading '0' (sometimes it's a '2' with no data following) can be treated as JSON, without parsing it. So you get an object with sid, upgrades, pingInterval, etc.