I'd like to create CGI-like environment where application's stdin/stdout connect to websocket for encoding/decoding using javascript on browser.  Another approach is to simply provide raw socket ID to application (placing burden of websocket encoding/decoding on application).

Is there a way to use IIS to support CGI with websocket attachment to stdin/stdout, or pass raw socketid and allow application to pack/unpack websocket with stdio information?