Git Product home page Git Product logo

webcppd's Introduction

webcppd

基于C++ Poco框架的HTTP动态服务器

纯C++开发,基于Poco框架,高性能、多线程

目标单一:纯动态资源服务器

依赖

  • PocoUtil
  • PocoNet
  • PocoFoundation

使用方法

webcppd是基于动态库加载的web动态服务器 通过配置文件配置动态库搜索目录 通过url(/a/b/c)指定动态库(liba.so)和需要运行的函数(bImpl),默认动态库名为libhome.so,默认运行函数是indexImpl。系统仅仅捕捉a和b,其余部分可选,例如c的含义由开发者自行定义使用。

编译: make 即可

清理: make clean 即可

运行: make run 即可

停止: make stop 即可

开发

开发者的工作很简单。只需三步:

  • 编写Poco::Net::HTTPRequestHandler的子类例如A,实现void handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response);
  • 编写 extern "C" Poco::Net::HTTPRequestHandler* aImpl()函数,返回 new A;
  • 编译为动态库例如libA.so并把动态库放置在配置的搜索目录中,测试访问http://localhost:8888/A/a即可

相关文章

Poco HTTP 服务器

webcppd's People

Watchers

James Cloos avatar  avatar  avatar

Forkers

343829084

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.