[Mono-dev] Status of HttpContext.AcceptWebSocketRequest ?

Daniel Lo Nigro lists at dan.cx
Sat Jul 6 09:13:47 UTC 2013


WebSockets use a totally different protocol, it doesn't use HTTP other than
for the initial handshake. It's easy for the Microsoft .NET Framework to
support it as they can just hook into IIS directly and extend it to support
WebSockets. It'd be a lot harder to do in Mono as support for WebSockets
needs to be supported by the web server itself You could probably do it in
"pure" Mono (eg. extend XSP to support websockets) but the WebSocket server
would have to be on a different port or different IP to the main web
server. All implementations I've seen have taken similar approaches -
Socket.io hooks into the server component of Node.js for example.

Worth noting that Nginx 1.4 supports proxying websockets (see eg.
http://siriux.net/2013/06/nginx-and-websockets/ and
https://chrislea.com/2013/02/23/proxying-websockets-with-nginx/) so your
Mono websocket server could be sitting on a different port and Nginx could
proxy to it.


On Tue, Jun 25, 2013 at 4:14 PM, SirNoSkill <quandary82 at hailmail.net> wrote:

> Question:
>
> I was playing around with MVC4 & websockets on mono3.
> I copied a simple echo example using websockets, and a chat
> example using Microsoft.WebSockets, first had to make them work on
> Windows
> since they were written using some CTP versions of .NET 4.5.
>
> I was astonished most things were implemented.
> However, apart from the runtime-bug HttpApplication->GetType not
> implemented,
> which seems to be easy enough to fix myself, there were 2 methods not
> implemented.
> HttpContext.AcceptWebSocketRequest
> and
> HttpContext.IsWebSocketRequest
>
>
> Now I'm sure IsWebSocketRequest is just a simple formality,
> but regarding AcceptWebSocketRequest I am wondering.
>
> Because my understanding is that AcceptWebSocketRequest registers a
> user-defined callback function in IIS8, and mono would need to register
> this function for several backends, like xsp4, Nginx +
> fastcgi-mono-server4,
> Apache + mod_mono, IIS, etc.
>
> So here my question:
> Has this just been left out because it is difficult/time-consuming,
> or is it not implemented on purpose ?
>
>
>
> --
>   SirNoSkill
>   quandary82 at hailmail.net
>
> --
> http://www.fastmail.fm - One of many happy users:
>   http://www.fastmail.fm/help/overview_quotes.html
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130706/0341996c/attachment.html>


More information about the Mono-devel-list mailing list