Exact format for WebSocket request header?

well, yes and no, Browser compatibility can still be spotty though these days it IS significantly more common.

I’m not trying to reinvent the wheel, I’m trying to understand the underlying layers, the entire point is to learn. Is it… a problem for someone to want to do that? It’s sure seeming more like you are upset that I’m asking the question at this point when all I’m doing is asking a simple question on a technical forum: If someone has the syntax for the header in a format that they know Twitch’s WebSockets like.
And note on that: the ws library you’re using is NOT the “accepted” library, node.js specifically does not have an accepted WebSocket library, ws is a 3rd party library from npm that was CLONED from the built-in WebSocket library for browsers.

I’m aware, been on IRC since for decades. I am unsure why you bring up the idea of tokenizers and regex. Note that in this case you use regex for the tokenizer and not the PARSER for the irc messages. In my case tmi.js was useful for breaking down twitch’s particulars, and it still is getting away from my original question about the websocket request header, unrelated to irc.

So instead of this weird go-around that we’re doing here, I’m going to try to cut through it all and just get back to the question for anyone else coming along around here:

Does anyone have to have a sample or the exact header format Twitch likes for its WebSocket connections to pubsub-edge.twitch.tv or irc-ws.chat.twitch.tv? :slight_smile: