Both http(s) and ws(s) protocols on single port.

Apr 12, 2014 at 5:18 AM
Hello! We need migration from HttpListener (platform and performance hell) to SOMETHING (SuperSocket) to have better control over networking and we not glad to became socket-writers from scratch :(. For first look we think that SuperSocket could match our requirements (???)

So it's just started, so we have many questions. Main of them is migration from HttpListenerRequest.IsWebSocketRequest

in our case we have single connection point for both http(s)/ws(s) connections on Win8/Srv2012. But it doesn't work correctly and is platform dependent (we require functionality on Win7/Linux).

How to use SuperSocket correctly for such thing?
1) Does it already have full correct implementation of Http(s)? With POST queries, multipart-form and so-on? If not what is limitation?

2) What is best and streamlined way to do something like such pseudocode:
var server = new SuperServer(new {port=2014, secure=SSL, protocols=HTTP|WS});
server.OnHttpRequest = (SuperHttpContext httpctx) => MyBridge.Process(httpctx);
server.OnStartSocket = (SuperSocketContext socketctx)=> MyBridge.Start(socketctx);

3) motivation:
with HttpListener we do it on such way. We don't need requirements to have command-dispatcher (have own), we don't need have stored message-level processig for WebSocket - just SuperSocketContext must have "OnRecieve" event.
So internal API binding will be made by MyBridge which is alias for our AppHost, and it's role is to provide single command interface for internal api without knowing of underlining call context (http, websoket, direct console readline, native or marshalled .net calls)