1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

新闻 Webcppd 1.0.9 发布,C++应用服务器 下载

Discussion in '软件资讯' started by 漂亮的石头, 2017-04-19.

  1. 漂亮的石头

    漂亮的石头 版主 Staff Member

    Joined:
    2012-02-10
    Messages:
    487,979
    Likes Received:
    47
    这是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++应用服务器 下载地址
     
Loading...