Create multiple websocket server with one port number

Mar 26, 2014 at 4:00 PM
for example,
wss://localhost:1234/PathA
wss://localhost:1234/PathB
wss://localhost:1234/PathC
Coordinator
Mar 26, 2014 at 4:19 PM
Sorry, you cannot do it for now.

But I think you can separated them by different sub protocols.
Mar 26, 2014 at 5:02 PM
I didn't find too much information regarding sub protocol in the document. Can you give me more detail how to achieve this using sub protocol?
Apr 3, 2014 at 2:31 PM
Edited Apr 3, 2014 at 2:31 PM
I would also be very interested to know how to do this!
(e.g. multiple websocket servers, same port, different sub protocols)
Coordinator
Apr 3, 2014 at 4:26 PM
In your client, you can pass in protocol, which is sub protocol name in SuperWebSocket server:

[http://www.w3.org/TR/2011/WD-websockets-20110419/](W3C WebSocket Documentaion)

[Constructor(in DOMString url, in optional DOMString protocols)]
[Constructor(in DOMString url, in optional DOMString[] protocols)]
....

And there is a sample project in SuperWebSocket which demonstrate how sub protocol works.