allinurl / gwsocket

fast, standalone, language-agnostic WebSocket server RFC6455 compliant
http://gwsocket.io
MIT License
745 stars 67 forks source link

add Protocol support in gwsocket #16

Open AurelienMarchand opened 5 years ago

AurelienMarchand commented 5 years ago

Websockets offer the option to specify a protocol at connection, yet currently gwsocket drops it silently. This is to request the feature of tracking the protocol specified at connection so that in strict mode packets can be isolated depending on protocol.

frink commented 4 years ago

@AurelienMarchand - not clear on how this would work.

Could you give a practical example of what you mean?

AurelienMarchand commented 4 years ago

There is no way to tell whether a packet coming in from a browser concerns some code for an internal library or an established sip subprotocol for instance. And I cannot run 2 instances of gwsocket (one for a custom lib and one for the sip subprotocol) since the pipes are hardcoded.

If it was possible to specify the pipes for reading/writing or even better, have the pipe names related to the subprotocol requested, it would be easy to support multi-subprotocols on the same port.

frink commented 4 years ago

So the issue is really about subprotocols in websockets? You want to handle multiple subprotocols from the same websocket URI?

AurelienMarchand commented 4 years ago

Precisely!On Oct 13, 2019 01:39, frink notifications@github.com wrote:So the issue is really about subprotocols in websockets? You want to handle multiple subprotocols from the same websocket URI?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.