Server per Request-Uri

May 9, 2012 at 8:23 PM

I have looked at SuperWebSocket (and also SuperSocket) and I think it is nicely done, using up-to-date techniques of high professional quality. There is one feature I think is still missing...

From all I read about Websockets, it seems that the idea is to connect to a logical socket at a given Uri. So, if I open a Websocket to  ws://example.org/myserver than I should get a different logical connection compared to connecting to ws://example.org/yourserver .

However, it seems that SuperWebsocket does not go that far. You have just one WebSocketServer per IP/port, and it is up to you to build another level of dispatching to forward the request to your actual server identified by the Uri.

I think it would be a good addition to this nice framework if a WebSocketServer instance would actually map to an Uri, and not just to an IP address/port.

Karl

Coordinator
May 10, 2012 at 2:23 AM

Great request!

SuperSocket 1.5 supports multiple listeners for one appServer instance  and the code of SuperWebSocket in folder "future" supports this feature already.

What you should do is adding listeners configuration in the server's configuration node:

<listeners>
     <listener ip="xxx" port="xxx" />
     <listener ip="yyy" port="yyy" />
</listeners>