From: Dean M. B. <mik...@gm...> - 2009-12-14 02:11:29
|
Hi Everyone, So recently I've finished moving the code from Subversion to Git and also continuing development on Github. I've made a branch 0.5-devel in the Git repository on Github and here's what I've been doing so far. I've been making some steady progress with supporting HTTP 1.1 by first refactoring the current client implementation. In the 0.5-devel branch I've renamed tags::http to tags::http_8bit_tcp_resolver (which is the default typedef for http::client). I've created another tag 'tags::http_8bit_udp_resolver' which, when used with the http::basic_client as the tag template parameter will actually use a UDP resolver. There's also a new trait dispatcher to determine the resolver policy as well as the type of the resolver to use based on the tag provided. 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. In the process, I will be supporting HTTPS as a protocol in the connection objects, using dynamic polymorphism to differentiate between the normal TCP connections and HTTPS connections. Questions, comments, suggestions, and contributions would be very much welcome. Thanks in advance and I hope this helps! -- Dean Michael Berris blog.cplusplus-soup.com | twitter.com/mikhailberis linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com |