vi / websocat

Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
MIT License
6.73k stars 259 forks source link

websocat broadcast should support "groups" #128

Open Zibri opened 2 years ago

Zibri commented 2 years ago

afaik, the websocket broadcast listens on an address. any request is brodcast to all other connections.

what would be useful instead is something like:

wss://example.org/dhgfdjkhfgdjhfgdj

in this way only clients connecting to the same url will get all the messages sent by others connecting to the same address.

wss://example.org/dhgfdjkhfgdjhfg/group1 wss://example.org/dhgfdjkhfgdjhfg/group2

hint: just take everthing after the root and use it as a groupname. in the above examples: "dhgfdjkhfgdjhfg/group1" and wss://example.org/dhgfdjkhfgdjhfg/group2 will be 2 different groups as wss://example.org/dhgfdZZZfgdjhfg/group2 will be a third group.

vi commented 2 years ago

Maybe you want my other project: https://github.com/vi/wsbroad/ ?

If needed I can provide a compiled build of version 0.2 (which is more stable than 0.1).

Maybe wsbroad should be mentioned in some README document, as you are not the first who asks (#100).

Zibri commented 2 years ago

Yep.. I also have a server that does the same in nodejs (based on the "dead" togetherjs) I am just saying that should be a part of websocat.