On Mon, Jan 23, 2012 at 9:35 AM, Christian Grothoff <[email protected]> wrote: > This has actually been on my "potential features" list for a little while. > The implementation is quite trivial; all that is really needed is some > minor modification to the MHD_response internals / API to give the > application a way to create a "websocket" response; that response would then > send the HTTP "UPGRADE" header and the API would need to provide a mechanism > to return the socket of the connection to the application. > > So a clean implementation would require modifications to MHD (I don't see > how it could be cleanly done with libwebsockets, other than by running a > second HTTP-server on a different port, but that's not clean in my book); > however, those modifications should be small and could be done in a > backwards-compatible manner. > > The one big major roadblock for implementing this in MHD is that this would > be tricky to automatically (!) test any such implementation. Last time I > checked, libcurl did not have support for websockets, which means we could > not use our usual approach of having a testcase with a libcurl <-> > libmicrohttpd setup for testing. And I am hesitant to add (even) more > features without (good) testcases... > > So if you have a *nice*, *free* C library for a websocket client that we > could use here, that would be useful and might convince me to think harder > about what the API should really look like ;-). But it is already good to > know that some of you are interested in this feature...
I need to add server triggered notifications to my app so I'd love to see this as well. Simon > Happy hacking! > > Christian > > > On 01/23/2012 05:54 PM, Jon Nalley wrote: >> >> After the 'Upgrade' request Websocket no longer uses HTTP. You might be >> able to leverage libwebsockets >> <http://git.warmcat.com/cgi-bin/cgit/libwebsockets> in conjunction with >> >> libmicrohttpd. >> >> On Mon, Jan 23, 2012 at 10:45 AM, Sven Geggus >> <[email protected] <mailto:[email protected]>> wrote: >> >> Hello, >> >> looking for a way to get rid of my pseudo server push using delayed >> ajax >> requests I came about the WebSocket-Protokoll. >> >> Would it be possible to implement this using libmicrohttpd without >> hacking >> the core? >> >> Sven >> >> -- >> Das allgemeine Persönlichkeitsrecht (Art. 2 Abs.1 i.V.m. Art.1 Abs. >> 1GG) >> umfasst das Grundrecht auf Gewährleistung der Vertraulichkeit und >> Integrität >> informationstechnischer Systeme. (BVerfG, 1BvR 370/07) >> /me is giggls@ircnet, http://sven.gegg.us/ on the Web >> >> > >
