如何开发与libcurl的http服务器 [英] How to develop http server with libcurl

查看:1149
本文介绍了如何开发与libcurl的http服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我米,工作libcurl的。这是非常好的(作为客户端)和我用来打开一个套接字服务器,然后送我的HTTP报文。

I m working with libcurl. It's very good (as client) and I used to open a socket to a server and then send my http packets.

我不知道是否有可能开发的http服务器与libcurl的。 HTTP服务器将侦听特定端口上,然后当它收到一个HTTP数据包然后HTTP服务器返回的需要摘要身份验证。

I'm wondering if it's possible to develop http server with the libcurl. the http server will listen on a given port then when it receive a http packet then the http server return a need to a digest authentication.

我计算器和卷曲的网站,但没有结果做了一些研究。

I made some research in stackoverflow and in the curl website but without result.

是否有可能做到这一点与libcurl的?怎么办呢?

Is it possible to do that with libcurl ? and how to do it?

推荐答案

要重复别人怎么说:不,的libcurl不适合服务器。它甚至在卷曲常见问题解答说:

To repeat what others have said: no, libcurl is not for servers. It is even said in the curl FAQ:

5.17我可以写一个服务器的libcurl?

5.17 Can I write a server with libcurl?

没有。 libcurl的没有提供任何功能或积木搭建任何形式的
  互联网协议服务器。 libcurl的是只有一个客户端库。
  对于服务器库,你需要在其他地方继续搜索,但
  存在许多优秀的开源的在那里的大多数协议
  你可能需要一台服务器。并有真正的好
  单机已经测试并证明了很多年的。
  有没有必要为你重塑他们!

No. libcurl offers no functions or building blocks to build any kind of internet protocol server. libcurl is only a client-side library. For server libraries, you need to continue your search elsewhere but there exist many good open source ones out there for most protocols you could possibly want a server for. And there are really good stand-alone ones that have been tested and proven for many years. There's no need for you to reinvent them!

这篇关于如何开发与libcurl的http服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆