Re: [Cppcms-users] Server
Brought to you by:
artyom-beilis
From: eric m. <mid...@gm...> - 2016-01-03 13:50:28
|
Ok thanks! I will dive into that. Just curious, what would you use instead of signal2 in this case? Kind regards, Eric On Sun, Jan 3, 2016 at 6:27 AM, Artyom Beilis <art...@gm...> wrote: > On Sun, Jan 3, 2016 at 10:44 AM, eric middelkoop > <mid...@gm...> wrote: > > Hi Artyom, > > > > Thank you for your quick response. That really did the trick! > > > > I have two other questions: > > 1) How does the "id" work under water? Is it that I just always need the > id > > and can add any data underneath it? > > Take a look on description of Server Sent Events: > > http://www.w3.org/TR/eventsource/ > > It is required for the client to automatic synchronization with the server > in case of disconnect. > > > 2) How does cppcms handle exceptions? For instance I have an Ajax-call > to a > > method and that method throws, but it seems that the exception is > swallowed > > somewhere as it does not appear anywhere? > > > > Depends... > > 1. If the exception is thrown from cppcms::application::main (i.e. > request handler) > it would be wrtten into log (of course if logging enabled) > 2. If it is thrown in the event loop thread - outside of ordinary > request it would propagate > all the way outside cppcms::service::run() > > > > > Ps. A nice comet-example with signals2 might be applicable for others as > > well. > > That is what mailing list for :-) > > I think boost::signal(2) is good for "broadcasting" a signal to > multiple listeners > it is less interesting in case of one event sent to a specific target I'd > just > > > -- > > Groetjes, > > Eric > > > > Regards. > Artyom > > > ------------------------------------------------------------------------------ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Groetjes, Eric http://www.lightandmagicphotography.nl http://www.lightandmagicphotography.com |