Re: [Cppcms-users] Server Sent events and CppCMS
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-08-10 15:49:01
|
I had changed your example a little: 1. Remove context from the list such that it would not write some more data until completion handler returns. 2. You use incorrectly completion handler - you need to receive the status in handler. 3. Reduced reconnect option so the client would reconnect immediatly Also it would be better to use Last-Event-ID header and setup ids so the client that is disconnected can reconnect and restart from correct point. Small notes about streaming and flushing: - In CppCMS internal server works 100%, - In Lighttpd works 100% - In Apache - it is required to add -flush option - In nginx: -- scgi it is required to add scgi_buffer off; option -- fastcgi ... It is not possible to disable buffering - at least I had not found one Once agains... STUPID nginx Best, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: Barbu Paul - Gheorghe <bar...@gm...> > To: cpp...@li... > Cc: > Sent: Thursday, August 9, 2012 11:44 PM > Subject: Re: [Cppcms-users] Server Sent events and CppCMS > > Hi again. > > So I managed to implement a chat using SSE and CppCMS, you can find it here: > > https://gist.github.com/3307849 > > (the Makefile and config.js are the same ones as in the "Implementing > Chat" > tutorial) > > It's just a proof of concept, it has issues: > > The biggest one is that after I send some messages and wait for about 30 seconds > > the following error appears: > http://i.imgur.com/jtQUZ.png > > If I refresh the page everything seems fine again, then if I wait 30 seconds > with no activity the error appears. I think this is somehow related to > chat::get(), but I'm not really sure. > > What response is generated if chat::get() sends no explicit response? > > > The second issue is the TODO in chat.cpp. > > -- > Barbu Paul - Gheorghe > Common sense is not so common - Voltaire > Visit My GitHub profile to see my open-source projects - > https://github.com/paullik > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |