From: Glyn M. <gly...@gm...> - 2009-12-14 09:20:14
|
Hi Dean, 2009/12/14 Dean Michael Berris <mik...@gm...> > > Next I'll be working on the connection management policy that > dispatches based on the HTTP versions and the tag parameter. The > connection management policy will look like the following: > > HTTP Version | Tag | Behavior > HTTP 1.1 | http_default_8bit_*_resolver | All requests default to > 'Connection: close", one request one connection. > HTTP 1.1 | http_keepalive_8bit_*_resolver | For a given host, > connections are persistent and re-usable, unless server sends > 'Connection: close' to a response. > HTTP 1.1 | http_futures_8bit_*_resolver | Client becomes active > object, results are future<basic_response<Tag> >, one request one > connection. > HTTP 1.1 | http_futures_pooled_8bit_*_resolver | Client becomes > active object, results are future<basic_response<Tag> >, connections > are pooled 2 per host. > HTTP 1.1 | http_async_8bit_*_resolver | Client becomes active > object, requests will have a function object parameter which handles > streaming data, one connection per request. > HTTP 1.1 | http_async_pooled_8bit_*_resolver | Client becomes > active, requests will have a function object parameter which handles > streaming data, connections are pooled 2 per host. > > This is difficult to read in my e-mail program. In any case, I think this belongs on the wiki. It would be useful to provide a catalogue of all tags on the wiki and eventually in the quickbook docs. > Questions, comments, suggestions, and contributions would be very much > welcome. > > `hello_world.cpp` can be repeated in `examples/server/hello_world.cpp` (where it can therefore be documented in quickbook). I think that's a really nice example, an HTTP server in C++ in less than 40 lines ;) Though the `request_header` type is either a struct or it's using a C++0x initializer list. G |