; // document root
// Initialize application code
cHelloForm hello( theServer );
// run the server
theServer.Run();
你可能需要在其他线程中启动服务器,这样你应用能够继续在实验室装置中记录日志数据。为了做到这一点,更改对server::run的调用:
boost::thread* pThread = new boost::thread(
boost::bind(
&http::server::server::run, // member function
&theServer ) ); // instance of class
Webem控件是以标准方式监视显示和操作应用数据的细节的类,所以应用程序开发者不需要关注生成HTML文本的所有细节。
示例程序使用一个webem来列出一个SQLITE数据表的所有内容,且提供了添加和删除记录的能力。在本文的开始是它的截图。