Recommendation for an http daemon in C++

This may not be the most appropriate venue to ask this question, but it's relevant nonetheless. I googled "httpd" and "C++ socket", etc. There are quite a few things turned up for the latter, but to my surprise, few for the former. I'm looking for a good example of the former, which probably has to be built on top of the latter. The few I found through search on the net are pretty much in the old C/C++/MFC paradigm; I prefer something more modern and in terms of quality and caliber closer to the libraries in the boost collection. Any suggestion? Thanks, Greg

Gregory Dai <gregory.dai@gmail.com> wrote:
This may not be the most appropriate venue to ask this question, but it's relevant nonetheless.
I googled "httpd" and "C++ socket", etc. There are quite a few things turned up for the latter, but to my surprise, few for the former. I'm
I suggest that you turn to asio http://asio.sourceforge.net/ - we use it in production (as a http deamon, even though asio is more general than that) and it works very well. B.

I googled "httpd" and "C++ socket" ... I suggest that you turn to asio http://asio.sourceforge.net/ ...
Anounced just over a week ago was a beta release of Pion, an HTTP library built on top of ASIO:
From Mike Dickey:
I'm pleased to announce the 0.4.0 ("stable" beta) release of the Pion Network Library ("pion-net"). pion-net is a C++ development library for implementing lightweight HTTP interfaces. pion-net is open source software licensed under the Boost Software License, which allows anyone to use it for free in both commercial and non-commercial applications. pion-net uses the Boost and ASIO libraries to provide a web service plug-in framework for handling HTTP requests. Although it is more geared towards server-side applications, the latest release includes client-side capabilities as well (for sending requests and receiving responses, either asynchronously or synchronously). Support for HTTP 1.0/1.1, pipelining, chunked encodings, query and cookie parsing is all included. Currently, five development platforms are supported. For more information, please see http://www.atomiclabs.com/pion/net/. --- I'll let Mike add additional details as needed. I haven't used Pion, just briefly glanced through the documentation so far. Cliff

I thought it'd be worth mentionning libcurl and libdaemon. Not that it will actually fit your needs, but who knows :) Philippe

Gregory Dai wrote:
I googled "httpd" and "C++ socket", etc. There are quite a few things turned up for the latter, but to my surprise, few for the former. I'm looking for a good example of the former, which probably has to be built on top of the latter. The few I found through search on the net are pretty much in the old C/C++/MFC paradigm; I prefer something more modern and in terms of quality and caliber closer to the libraries in the boost collection.
Any suggestion?
What sort of license do you prefer? You can find my effort, which uses a Boost.Spirit parser to parse HTTP requests, here: https://svn.chezphil.org/libpbe/trunk/include/HttpDaemon.hh. I doubt it will meet you "quality and calibre" requirements thought... There is a C++ module for Apache, but it doesn't seem to have been updated for Apache 2.2. AppWeb might be worth a look - it seems to be more C++-friendly than some of the alternative "light weight" HTTP servers. Regards, Phil.

Hello, 2007/11/17, Gregory Dai <gregory.dai@gmail.com>:
[...]
Any suggestion?
Have a look at http://www.webtoolkit.eu/wt/ It is a C++ AJAX library, that comes with its own httpd daemon based on asio. regards Andreas Pokorny

I thank you all for having responded to my question. It appears that asio is a common factor in most recommendations. I'll definitely look into it. Have a great Thanksgiving holiday.
participants (6)
-
Andreas Pokorny
-
Bronek Kozicki
-
Cliff Green
-
Gregory Dai
-
Phil Endecott
-
Philippe Vaucher