So, I have a SocketStream server, which has a nice Web UI client, and all that works great.
In the Web UI a user can input a message into an input form, and push a button which sends the message via ss-rpc to the server, and then the server does:
ss.publish.channel('my-channel', 'event', data);
So, I'm publishing to a specific WebSocket channel via socket stream.
Now, I have other clients that are not served from this server via SocketStream -- they are standalone apps that run in an embedded WebKit browser environment, and I want to connect them to the same server, and be able to receive these events and participate in the WebSocket channel.
The WebSocket URL in Chrome Inspector looks something like this:
If I want to write a client that can connect to the server and subscribe to a particular channel without the SocketStream client code -- how might I go about it?
Just doing something like this:
ws.onmessage = function (evt) { console.log(evt); }
Does not seem to work, and it isn't clear to me the URL structure here, since all SocketStream web sockets seem to use the same general URL path of ws://host:port/{engine.io | socket.io}/default/?queryparams
For pub/sub channels -- I guess the channel info is embedded in the message payload -- since it does not seem to be embedded in the URL. Is that correct?