HTTP stack in C

2019-04-10 17:02发布

问题:

Are there any HTTP protocol stacks implemented in C?

Thanks in advance.

Update: looking for client implementations.

回答1:

You didn't say whether you're looking for client or server, but a quick google turned up libmicrohttp for embedding an HTTP server in your app, and of course libcurl for client-side stuff.

Edit In answer to your update, definitely libcurl is the answer. I've used it in the past and it's got about every feature you can imagine underneath a fairly easy-to-use interface.



回答2:

Libcurl and libsoup are two client/server side open source http stacks.

Warning : libsoup doesnt have enough documentation. However theres always SO if you get stuck.



回答3:

Apache, nginx, etc. etc. are all in C, but take a look at libevent.



回答4:

You might be interested in Serf - used by Subversion and built on top of the Apache Portable Runtime.



回答5:

I recommend libcurl, it support a large number of protocols, including HTTP. Also, it's well documented, and is quite simple to use.



回答6:

In the Windows world, there's also WinInet for client.



标签: c http