I'm searching a cgi lib in C to build a restfu

2019-07-04 05:03发布

I want to build a restful (CoAP) web service which can execute c code to handle events.

Therefore I'm searching a lib which provides me with a rest api in C and cgi similar to restcgi which is sadly in c++ or CGI-Simple which is in perl.

The server is running on a embedded device so it has very limited resources and the services will be accessed only by machines.

Thank you very much.

标签: c rest cgi core
2条回答
beautiful°
2楼-- · 2019-07-04 05:28

I have recently came across one quite interesting CoAP library which uses libevent. You will aslo want to check Klone embeddable HTTP server by the same guys at KoanLogic. I have previously looked at libcoap, but it didn't find it very usable at the time. You may also wish to try using either libuv, libev or (libevent)[http://libevent.org]. But I guess it's probably gonna be much easier to adopt some of the code from WT repository and get your CoAP/HTTP server done.

查看更多
看我几分像从前
3楼-- · 2019-07-04 05:33

You may be interested in Raphters framework and its architecture. It's pretty small, so you can examine the code, the framework itself can be used as a FastCGI backend for some web server, e.g. for nginx.

查看更多
登录 后发表回答