Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C/C++ HTTP library, that handles only the logic?

Tags:

c++

c

http

logic

I am looking for an HTTP library for C/C++, that handles only the protocol logic, instead of the actual transport mechanism. Libraries I've came across tend to incoperate the entire communication process, which is not what I need.

However, I'm looking for something that's more than merely an HTTP parser. Ideally it would also take care of things such as session/connection management, multiplexing, etc... only that it would leave the actual implementation of the communication details for application to perform. I'm looking at both client and server ends, though any of them would be helpful.

Preferably I'm looking for something that's free (non GPLed, though). HTTPS is a plus. Lightweightness is a plus. Simplicity is a big plus.

Anything like this?

like image 507
cvb Avatar asked Nov 15 '22 13:11

cvb


1 Answers

I think the best thing you are going to find is one that implements it in a well separated manner. An HTML Server without a socket implementation is useless to most of the world. I would look for well separated code. Here is an example of a very minimalistic html server that seems it may be well separated, not completely sure, as I have not tried it myself, but you could replace the socket classes with your own implementation and wrappers, and do it that way.

http://www.adp-gmbh.ch/win/misc/webserver.html

There may be other examples out there as well. A good google search may be your friend here. At any rate, I don't think you are going to find a totally disconnected server and client that is totally abstracted from the socket implementation(s) that they use. I've had to do this myself before, to write an html client that did not use sockets, but used serial io to another device, that would pass the data through onto the wider internet.

like image 198
Jay Kramer Avatar answered Dec 05 '22 01:12

Jay Kramer