allinurl/gwsocket

add Protocol support in gwsocket

AurelienMarchand opened this issue · 4 comments

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

@AurelienMarchand - not clear on how this would work.

Could you give a practical example of what you mean?

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

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