热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

我在C中搜索一个cgilib来构建一个基于rest的web服务。-I'msearchingacgilibinCtobuildarestfulwebservice

Iwanttobuildarestful(CoAP)webservicewhichcanexecuteccodetohandleevents.我想构建一个restfu

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

我想构建一个restful (CoAP) web服务,它可以执行c代码来处理事件。

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.

因此,我正在搜索一个lib,它为我提供了一个在C和cgi中与restcgi相似的rest api,这在perl中是很遗憾的,因为c++或CGI-Simple。

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.

非常感谢。

2 个解决方案

#1


1  

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.

您可能对Raphters框架及其体系结构感兴趣。它非常小,所以您可以检查代码,框架本身可以用作一些web服务器的FastCGI后端,例如nginx。

#2


0  

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.

我最近遇到了一个非常有趣的CoAP库,它使用libevent。您将会想要在KoanLogic中对Klone嵌入式HTTP服务器进行检查。我之前看过libcoap,但它当时并没有发现它的可用性。您也可以尝试使用libuv, libev或者(libevent)[http://libevent.org]。但是我想,从WT存储库中采用一些代码并完成CoAP/HTTP服务器可能会更容易一些。


推荐阅读
author-avatar
zhengxing
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有