Webcppd 1.0.9 发布,C++应用服务器

栏目: Lua · 发布时间: 9年前

内容简介:Webcppd 1.0.9 发布,C++应用服务器

这是webcppd升级为 httpevent 后的第二个更新。

主要更新:

  • 解决内存多余消耗问题

  • 解决空值响应问题

httpevent 是webcppd的继承者,在多个方面增强了后者,并且融入了 lua 开发要素,可同时支持使用c++和lua进行web开放。

C++ HELLOWORLD:

#include <httpevent.hpp>
namespace httpevent {
    class hello : public view {

        void handler(const request& req, response& res) {
            res.send_head("Content-Type", "text/plain;charset=UTF-8")
                    .send_body("hello,world");
        }

    };
}

lua HELLOWORLD:

local hello={}
function hello.main()
  httpevent.response:send_head("Content-Type", "text/plain;charset=UTF-8")
    :send_body('hello,world')
end

return hello

依赖:

  • libevent v2.1.8+

  • Poco framework v1.6+

  • lua devel v5.1+

  • openssl devel

开发例子请参考: https://github.com/webcpp/httpevent/tree/master/plugin

更多介绍参见: https://github.com/webcpp/httpevent


以上所述就是小编给大家介绍的《Webcppd 1.0.9 发布,C++应用服务器》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Linux/UNIX系统编程手册

Linux/UNIX系统编程手册

Michael Kerrisk / 孙剑 许从年 董健、孙余强 郭光伟 陈舸 / 人民邮电出版社 / 2014-1 / 158

《linux/unix系统编程手册(上、下册)》是介绍linux与unix编程接口的权威著作。linux编程资深专家michael kerrisk在书中详细描述了linux/unix系统编程所涉及的系统调用和库函数,并辅之以全面而清晰的代码示例。《linux/unix系统编程手册(上、下册)》涵盖了逾500个系统调用及库函数,并给出逾200个程序示例,另含88张表格和115幅示意图。 《li......一起来看看 《Linux/UNIX系统编程手册》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

SHA 加密
SHA 加密

SHA 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具