设为首页收藏本站

LUPA开源社区

 找回密码
 注册
文章 帖子 博客
LUPA开源社区 首页 业界资讯 软件追踪 查看内容

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

2017-4-19 20:34| 发布者: joejoe0332| 查看: 416| 评论: 0|原作者: oschina|来自: oschina

摘要: 这是webcppd升级为httpevent后的第二个更新。主要更新:解决内存多余消耗问题解决空值响应问题httpevent是webcppd的继承者,在多个方面增强了后者,并且融入了lua开发要素,可同时支持使用c++和lua进行web开放。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


酷毙

雷人

鲜花

鸡蛋

漂亮
  • 快毕业了,没工作经验,
    找份工作好难啊?
    赶紧去人才芯片公司磨练吧!!

最新评论

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部