Create multiple websocket server with one port number

Mar 26, 2014 at 5:00 PM
for example,
Mar 26, 2014 at 5:19 PM
Sorry, you cannot do it for now.

But I think you can separated them by different sub protocols.
Mar 26, 2014 at 6: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 3:31 PM
Edited Apr 3, 2014 at 3:31 PM
I would also be very interested to know how to do this!
(e.g. multiple websocket servers, same port, different sub protocols)
Apr 3, 2014 at 5:26 PM
In your client, you can pass in protocol, which is sub protocol name in SuperWebSocket server:

[](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.