Hi!
I am trying to get the rationale of cppCMS.
I modified the "chat" example as follows but the system then runs very slowly. My browser does not echo the first message in 8 seconds. And since it doesn't echo the second message in minutes, so I killed the server. Both the server and browser run in the same host. Can it be a problem in chat.cpp or the script in the_chat.html?
-----------
int main(int argc,char **argv)
{
try {
cppcms::service service(argc,argv);
/*
booster::intrusive_ptr<chat> c=new chat(service);
service.applications_pool().mount(c);
*/
service.applications_pool().mount(cppcms::applications_factory<chat>()); //slow!
service.run();
}
catch(std::exception const &e) {
std::cerr<<"Catched exception: "<<e.what()<<std::endl;
return 1;
}
return 0;
}
---------
Regards,
CN
|