1

Possible Duplicate:
C/C++ - Any good web server library?

What well known C/C++ libraries are out there that could allow one to implement servlets, or at least provide most of the essentials for dealing with HTTP/CGI protocols such as http headers, error codes, cookies, GET/POST etc.

So far I have only found CPPSERV.

EDIT: Looking for server side solutions.

Community
  • 1
  • 1
harschware
  • 13,006
  • 17
  • 55
  • 87
  • Haven't started yet, could be either, would choose based on what's available to me. – harschware Sep 15 '10 at 02:40
  • 3
    This is rather similar to [a question I asked some time back.](http://stackoverflow.com/questions/2342921/c-or-c-http-daemon-in-a-thread) Short answer: [GNU libmicrohttpd](http://www.gnu.org/software/libmicrohttpd/) – Mike DeSimone Sep 15 '10 at 04:01
  • 1
    See [ C/C++ - Any good web server library? ](http://stackoverflow.com/questions/1486818/c-c-any-good-web-server-library). – Matthew Flaschen Sep 15 '10 at 04:29

8 Answers8

3

Tntnet

pdb
  • 61
  • 5
2

Here's one in C with ridiculous performance characteristics: ry's http-parser.

Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
2

CppCMS and Wt both spring to mind, given your requirements.

The official FastCGI library can also operate in a "servlet" mode.

greyfade
  • 24,948
  • 7
  • 64
  • 80
1

You can use http://sourceforge.net/projects/aclcpp/.

This library supports HTTP Servlet just like Java Servlet, written by C++, which includes

  • HttpServlet(HttpServletRequest, HttpServletResponse)
  • HttpSession
  • HttpCookie
alestanis
  • 21,519
  • 4
  • 48
  • 67
zsxxsz
  • 11
  • 1
1

One way to do this is to write your servlet as an Apache module - Apache itself then acts as the HTTP server-side library.

caf
  • 233,326
  • 40
  • 323
  • 462
1

I would recommend you to take a look on CppCMS web framework, it has all you ask for.

Artyom
  • 31,019
  • 21
  • 127
  • 215
0

You may have some luck plugging into Mongrel2, although I've never tried.

Jack Kelly
  • 18,264
  • 2
  • 56
  • 81
-1

I would recommend looking at libcurl given curl's popular usage.

Christopher Hunt
  • 2,071
  • 1
  • 16
  • 20