Re: [Cppcms-users] comet server empty reply
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2012-12-31 12:29:45
|
Also I recommend try to use long polling as fallback only as all modern browsers already support HTML5 EventSource (server-sent events) Long polling would be much heavier. Note the benchmark results I had shown are for EventSource and not long polling. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: william lee <we...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Monday, December 31, 2012 1:50 PM >Subject: Re: [Cppcms-users] comet server empty reply > > >Yes! You are absolutely right! >after change the config.js setting, now I get it working as expected. > > >I'm always struggling with code and missing the settings thing.... > > >This is a long polling server + client, I want to see how many concurrent connection it can handle :) > > >Thank you again, Artyom! > > >Best Regards, >William L. > > > >On Mon, Dec 31, 2012 at 3:37 PM, Artyom Beilis <art...@ya...> wrote: > >First of all, take a look on: >> >>http://cppcms.com/wikipp/en/page/cppcms_1x_config#http.timeout >> >> >>You may want to increase this parameter. >> >>2nd what kind of chat do you implement? >> >> >>Long polling or type of event-stream? >> >> >> >>Also the client should be ready for disconnections >>and restart connection. You can also send some kind of applicative keep-alive >>messages (not HTTP keep alive) so the client would know that the server is up. >> >> >> >> >>Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.com/ >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >>>________________________________ >>> From: Lee Elenbaas <lee...@gm...> >>>To: cpp...@li... >>>Sent: Monday, December 31, 2012 9:05 AM >>>Subject: Re: [Cppcms-users] comet server empty reply >>> >>> >>> >>>this sounds like a timeout from the client side - not from the server >>>connection needs to be kept alive from both ends >>> >>> >>> >>>On Mon, Dec 31, 2012 at 8:00 AM, william lee <we...@gm...> wrote: >>> >>>btw, I did sent "Connection: Keep-Alive" from client via connect, but it doesn't make any difference. >>>> >>>> >>>>thanks, >>>>William L. >>>> >>>> >>>> >>>>On Mon, Dec 31, 2012 at 1:47 PM, william lee <we...@gm...> wrote: >>>> >>>>Hi, >>>>>I'm using CppCMS to create a comet server, pretty much same as the Chat example. I release context and store it in a map for broadcast or targeted reply later. >>>>> >>>>> >>>>>At same time, I'm using libcurl to create a client app to connect to cppcms comet server via http 127.0.0.1:8080 GET method >>>>> >>>>> >>>>>I found a interesting thing, like 10s-15s after http connected, the client side will disconnect and print "Empty reply from server", "Server returned nothing (no headers, no data)". >>>>>From comet server side code, there is no timeout release context. >>>>> >>>>> >>>>>This behavior happens on Win7 and ubuntu server. >>>>> >>>>> >>>>>Anyone have idea why such thing happen? >>>>>Is there any limitation with long polling that caused this? I expect a live HTTP connection can wait for several minutes. >>>>> >>>>> >>>>>thanks! >>>>>William L. >>>> >>>>------------------------------------------------------------------------------ >>>>Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>>with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>>>MVPs and experts. SALE $99.99 this month only -- learn more at: >>>>http://p.sf.net/sfu/learnmore_122412 >>>>_______________________________________________ >>>>Cppcms-users mailing list >>>>Cpp...@li... >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>>> >>> >>> >>> >>>-- >>>-- >>>lee >>>Lee Elenbaas >>>lee...@gm... >>> >>>------------------------------------------------------------------------------ >>>Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>>MVPs and experts. SALE $99.99 this month only -- learn more at: >>>http://p.sf.net/sfu/learnmore_122412 >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >>> >>------------------------------------------------------------------------------ >>Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>MVPs and experts. SALE $99.99 this month only -- learn more at: >>http://p.sf.net/sfu/learnmore_122412 >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > >------------------------------------------------------------------------------ >Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >MVPs and experts. SALE $99.99 this month only -- learn more at: >http://p.sf.net/sfu/learnmore_122412 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |