Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57598 - in sandbox/SOC/2007/cgi/branches/pickmeup: boost/cgi boost/cgi/acgi boost/cgi/cgi boost/cgi/common boost/cgi/connections boost/cgi/detail boost/cgi/fcgi boost/cgi/fwd boost/cgi/http boost/cgi/impl boost/cgi/import boost/cgi/scgi boost/cgi/utility libs/cgi/build/msvc/9.0/Boost.CGI libs/cgi/build/msvc/9.0/Boost.CGI/acgi_cookie_game libs/cgi/build/msvc/9.0/Boost.CGI/acgi_echo libs/cgi/build/msvc/9.0/Boost.CGI/acgi_hello_world libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world libs/cgi/doc/src libs/cgi/example/acgi/cookie_game libs/cgi/example/acgi/cookie_game2 libs/cgi/example/acgi/echo libs/cgi/example/acgi/hello_world libs/cgi/example/cgi/DebugServer2 libs/cgi/example/fcgi/echo libs/cgi/example/fcgi/file_browser libs/cgi/example/fcgi/hello_world
From: lists.drrngrvy_at_[hidden]
Date: 2009-11-12 09:36:28


Author: drrngrvy
Date: 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
New Revision: 57598
URL: http://svn.boost.org/trac/boost/changeset/57598

Log:
Changing root namespace from cgi to boost. This is configurable but I definitely don't want to use the ::cgi namespace.
Also refactored aCGI a little to remove the need to pass in an `acgi::service`. This proof of concept is going to result in removing the distinction between `acgi` and `cgi`, as the performance gains in not using async I/O aren't worth the overhead in the library or user code.
Added:
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/config.hpp (contents, props changed)
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/basic_io_object.hpp (contents, props changed)
Removed:
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.ncb
Binary files modified:
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.suo
Text files modified:
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi.hpp | 8
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/acceptor.hpp | 10
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request.hpp | 11
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request_impl.hpp | 12
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request_service.hpp | 10
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/service.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_client.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_connection.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_request.hpp | 172
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_request_acceptor.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi.hpp | 18
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request.hpp | 7
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request_impl.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request_service.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/service.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/basic_protocol_service.hpp | 7
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/commit.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/connection_base.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/cookie.hpp | 15
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/error.hpp | 20
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/form_parser.hpp | 33
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/form_part.hpp | 5
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/header.hpp | 9
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/io_service_provider.hpp | 19
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/is_async.hpp | 5
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/map.hpp | 10
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/name.hpp | 5
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/parse_options.hpp | 5
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/path_info.hpp | 15
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_acceptor_service.hpp | 5
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_base.hpp | 5
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_service.hpp | 7
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_status.hpp | 5
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/response.hpp | 76
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/return.hpp | 11
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/role_type.hpp | 9
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/source_enums.hpp | 5
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/tags.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/async_stdio.hpp | 8
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/shareable_tcp_socket.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/stdio.hpp | 28
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/tcp_socket.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/basic_sync_io_object.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/cgi_request_impl_base.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/cgi_service_impl_base.hpp | 12
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/common_headers.hpp | 1
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/extract_params.hpp | 9
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/protocol_traits.hpp | 10
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/push_options.hpp | 2
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/save_environment.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/service_base.hpp | 15
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/service_id.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/throw_error.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/url_decode.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/url_decode.ipp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/error.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi.hpp | 13
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/acceptor.hpp | 10
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/acceptor_service_impl.hpp | 14
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/client.hpp | 30
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/error.hpp | 18
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request.hpp | 8
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_acceptor_service.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_fwd.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_service.hpp | 39
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/service.hpp | 25
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/specification.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_connection_fwd.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_protocol_service_fwd.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_request_acceptor_fwd.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_request_fwd.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/io_service_provider_fwd.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/request_service_fwd.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/http/status_code.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/basic_request.ipp | 60
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/fcgi_request_service.ipp | 59
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/form_parser.ipp | 9
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/response.ipp | 84
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/basic_io_object.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/buffer.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/io_service.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/read.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/streambuf.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/write.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/acceptor.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/acceptor_service_impl.hpp | 12
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request.hpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_acceptor_service.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_impl.hpp | 16
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_service.hpp | 14
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/service.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/service_impl.hpp | 14
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/get.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/get_value.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/has_key.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/redirect.hpp | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.sln | 6
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_cookie_game/acgi_cookie_game.vcproj | 24
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_echo/acgi_echo.vcproj | 24
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_hello_world/acgi_hello_world.vcproj | 24
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world/cgi_hello_world.vcproj | 24
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/cgi.qbk | 7
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/reference.qbk | 26013 +++++++++++++++++++++++++++++++++++++++
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/user_guide.qbk | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/cookie_game/main.cpp | 3
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/cookie_game2/main.cpp | 31
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/echo/main.cpp | 3
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/hello_world/main.cpp | 7
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/cgi/DebugServer2/TracebackServer.cpp | 12
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp | 4
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/echo/main.cpp | 10
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/file_browser/main.cpp | 22
   sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/hello_world/main.cpp | 1
   114 files changed, 26733 insertions(+), 727 deletions(-)

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -13,18 +13,18 @@
 #include "boost/cgi/acgi/request.hpp"
 #include "boost/cgi/detail/common_headers.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace acgi {
 
- using namespace ::cgi::common; // import common namespace elements.
+ using namespace ::BOOST_CGI_NAMESPACE::common; // import common namespace elements.
 
  } // namespace acgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 /// Dump acgi stuff into the boost namespace
 namespace boost {
  namespace acgi {
- using namespace ::cgi::acgi;
+ using namespace ::BOOST_CGI_NAMESPACE::acgi;
  } // namespace acgi
 } // namespace boost
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/acceptor.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/acceptor.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/acceptor.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,20 +9,24 @@
 #ifndef CGI_ACGI_ACCEPTOR_HPP_INCLUDED__
 #define CGI_ACGI_ACCEPTOR_HPP_INCLUDED__
 
+#include "boost/cgi/detail/push_options.hpp"
+
 #include "boost/cgi/basic_request_acceptor.hpp"
 #include "boost/cgi/acgi/request_acceptor_service.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace acgi {
 
    /// Typedef for common usage (ACGI)
    typedef
- ::cgi::common::basic_request_acceptor<
+ ::BOOST_CGI_NAMESPACE::common::basic_request_acceptor<
        acgi_request_acceptor_service<>
>
    acceptor;
 
  } // namespace acgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
+
+#include "boost/cgi/detail/pop_options.hpp"
 
 #endif // CGI_ACGI_ACCEPTOR_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,6 +9,8 @@
 #ifndef CGI_ACGI_REQUEST_HPP_INCLUDED__
 #define CGI_ACGI_REQUEST_HPP_INCLUDED__
 
+#include "boost/cgi/detail/push_options.hpp"
+
 #include "boost/cgi/detail/protocol_traits.hpp"
 #include "boost/cgi/common/tags.hpp"
 #include "boost/cgi/acgi/service.hpp"
@@ -16,7 +18,8 @@
 #include "boost/cgi/acgi/request_service.hpp"
 #include "boost/cgi/fwd/basic_request_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
+
  namespace acgi {
 
   typedef
@@ -26,12 +29,14 @@
   request;
 
  } // namespace acgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 //namespace boost { namespace acgi {
-// typedef ::cgi::basic_request< cgi::acgi_request_service, cgi::acgi_service> request;
+// typedef ::BOOST_CGI_NAMESPACE::basic_request< BOOST_CGI_NAMESPACE::acgi_request_service, BOOST_CGI_NAMESPACE::acgi_service> request;
 //} }
 
 #include "boost/cgi/basic_request.hpp"
 
+#include "boost/cgi/detail/pop_options.hpp"
+
 #endif // CGI_ACGI_REQUEST_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request_impl.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,6 +9,8 @@
 #ifndef CGI_ACGI_REQUEST_IMPL_HPP_INCLUDED__
 #define CGI_ACGI_REQUEST_IMPL_HPP_INCLUDED__
 
+#include "boost/cgi/detail/push_options.hpp"
+
 #include "boost/cgi/acgi/service.hpp"
 #include "boost/cgi/basic_client.hpp"
 #include "boost/cgi/connections/async_stdio.hpp"
@@ -16,18 +18,18 @@
 
 // Make this ProtocolService-independent
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace acgi {
 
   class request_impl
     : public detail::cgi_request_impl_base<connections::async_stdio>
   {
   public:
- typedef ::cgi::acgi::service protocol_service_type;
+ typedef ::BOOST_CGI_NAMESPACE::acgi::service protocol_service_type;
     typedef protocol_service_type::protocol_type protocol_type;
     typedef connections::async_stdio connection_type;
     typedef
- ::cgi::common::basic_client<
+ ::BOOST_CGI_NAMESPACE::common::basic_client<
         connection_type, common::tags::acgi
>
     client_type;
@@ -41,7 +43,9 @@
   };
 
  } // namespace acgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
+
+#include "boost/cgi/detail/pop_options.hpp"
 
 #endif // CGI_ASYNC_CGI_REQUEST_IMPL_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/request_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,6 +9,8 @@
 #ifndef CGI_ACGI_SERVICE_IMPL_HPP_INCLUDED__
 #define CGI_ACGI_SERVICE_IMPL_HPP_INCLUDED__
 
+#include "boost/cgi/detail/push_options.hpp"
+
 #include "boost/cgi/common/tags.hpp"
 #include "boost/cgi/common/map.hpp"
 #include "boost/cgi/acgi/request_impl.hpp"
@@ -18,7 +20,7 @@
 #include "boost/cgi/connections/async_stdio.hpp"
 #include "boost/cgi/detail/cgi_service_impl_base.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace acgi {
 
   class request_service
@@ -42,7 +44,7 @@
     void construct(implementation_type& impl)
     {
       impl.client_.set_connection(
- implementation_type::connection_type::create(this->io_service())
+ implementation_type::connection_type::create(this->get_io_service())
       );
     }
 
@@ -57,6 +59,8 @@
   };
 
  } // namespace acgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
+
+#include "boost/cgi/detail/pop_options.hpp"
 
 #endif // CGI_ASYNC_CGI_SERVICE_IMPL_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/acgi/service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,7 +12,7 @@
 #include "boost/cgi/common/tags.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   /// typedef for typical usage
   namespace acgi {
@@ -37,7 +37,7 @@
   */
 
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/common/basic_protocol_service.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_client.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_client.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_client.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -18,7 +18,7 @@
 #include "boost/cgi/connections/tcp_socket.hpp"
 
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   /// A client
@@ -43,7 +43,7 @@
   class basic_client
   {
   public:
- //typedef cgi::map map_type;
+ //typedef BOOST_CGI_NAMESPACE::map map_type;
     typedef Connection connection_type;
     typedef Protocol protocol_type;
     typedef typename connection_type::pointer connection_ptr;
@@ -155,6 +155,6 @@
   };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_BASIC_CLIENT_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_connection.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_connection.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_connection.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,13 +9,13 @@
 #ifndef CGI_BASIC_CONNECTION_HPP_INCLUDED__
 #define CGI_BASIC_CONNECTION_HPP_INCLUDED__
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   template<typename ConnectionType>
   class basic_connection;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_BASIC_CONNECTION_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_request.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_request.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -1,6 +1,6 @@
 // -- basic_request.hpp --
 //
-// Copyright (c) Darren Garvey 2007.
+// Copyright (c) 2007-2009 Darren Garvey.
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -23,19 +23,18 @@
 #include <boost/functional/hash.hpp>
 #include <boost/asio/io_service.hpp>
 #include <boost/system/error_code.hpp>
-#include <boost/asio/basic_io_object.hpp>
+#include <boost/utility/enable_if.hpp>
 ///////////////////////////////////////////////////////////
 #include "boost/cgi/common/map.hpp"
-#include "boost/cgi/common/is_async.hpp"
 #include "boost/cgi/common/path_info.hpp"
 #include "boost/cgi/common/role_type.hpp"
 #include "boost/cgi/common/source_enums.hpp"
+#include "boost/cgi/common/parse_options.hpp"
 #include "boost/cgi/common/request_service.hpp"
 #include "boost/cgi/http/status_code.hpp"
 #include "boost/cgi/fwd/basic_request_fwd.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
-#include "boost/cgi/import/basic_io_object.hpp"
-#include "boost/cgi/detail/basic_sync_io_object.hpp"
+#include "boost/cgi/detail/basic_io_object.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
 #include "boost/cgi/detail/protocol_traits.hpp"
 
@@ -44,7 +43,8 @@
 # define BOOST_CGI_POST_MAX 6663322
 #endif // BOOST_CGI_POST_MAX
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
+
  namespace common {
 
    /// Get a hashed interpretation of the request.
@@ -75,14 +75,7 @@
           , typename ProtocolService
           , typename Allocator>
   class basic_request
- : public boost::mpl::if_<
- is_async<typename RequestService::protocol_type>
- , basic_io_object<RequestService>
- // A basic_sync_io_object is a little more lightweight
- // than a basic_io_object. It can't handle asynchonous
- // operations as a consequence.
- , detail::basic_sync_io_object<RequestService>
- >::type
+ : public detail::basic_io_object<RequestService>
   {
   public:
     typedef
@@ -90,7 +83,7 @@
         RequestService, ProtocolService
       , Allocator
> self_type;
- typedef ::cgi::common::map map_type;
+ typedef ::BOOST_CGI_NAMESPACE::common::map map_type;
     typedef RequestService service_type;
     typedef typename service_type::protocol_type protocol_type;
     typedef ProtocolService protocol_service_type;
@@ -100,14 +93,23 @@
     typedef typename implementation_type::string_type string_type;
     typedef typename implementation_type::client_type client_type;
     typedef typename implementation_type::buffer_type buffer_type;
+
+ /*
+ boost::enable_if<
+ boost::type_traits::is_same<
+ typename RequestService::protocol_type,
+ ::BOOST_CGI_NAMESPACE::common::tags::acgi
+ >
+ > ios;
+ */
 
     /// A proxy class to provide access to the data maps as member variables.
     /**
- * This wraps the underlying data map and exposes a std::map-like interface
- * for the different data maps.
+ * This wraps the underlying data map and exposes a std::map-like
+ * interface for the different data maps.
      *
- * It also includes an as<> member function which casts the found data into
- * any type the user specifies.
+ * It also includes an as<> member function which casts the found data
+ * into any type the user specifies.
      */
     template<typename MapType>
     struct data_map_proxy
@@ -153,6 +155,13 @@
          return impl->count(key);
       }
       
+ mapped_type& get(key_type const& key, mapped_type const& default_)
+ {
+ BOOST_ASSERT(impl);
+ const_iterator iter = impl->find(key);
+ return iter == impl->end() > default_ : *iter;
+ }
+
       template<typename T>
       T as(key_type const& key) {
         BOOST_ASSERT(impl);
@@ -184,8 +193,8 @@
     data_map_proxy<cookie_map> cookies;
 
     basic_request(const parse_options opts = parse_none
- , char** base_env = NULL)
- : detail::basic_sync_io_object<service_type>()
+ , char** base_env = NULL)
+ : detail::basic_io_object<service_type>()
     {
       if (opts > parse_none) load(opts, base_env);
       construct();
@@ -195,7 +204,7 @@
     basic_request(boost::system::error_code& ec
                  , const parse_options opts = parse_none
                  , char** base_env = NULL)
- : detail::basic_sync_io_object<service_type>()
+ : detail::basic_io_object<service_type>()
     {
       if (opts > parse_none) load(opts, ec);
     }
@@ -204,7 +213,7 @@
     basic_request(protocol_service_type& s
                  , const parse_options opts = parse_none
                  , char** base_env = NULL)
- : basic_io_object<service_type>(s.io_service())
+ : detail::basic_io_object<service_type>(s.io_service())
     {
       set_protocol_service(s);
       if (opts > parse_none) load(opts, base_env);
@@ -215,7 +224,7 @@
                  , boost::system::error_code& ec
                  , const parse_options opts = parse_none
                  , char** base_env = NULL)
- : basic_io_object<service_type>(s.io_service())
+ : detail::basic_io_object<service_type>(s.io_service())
     {
       set_protocol_service(s);
       if (opts > parse_none) load(opts, ec, base_env);
@@ -224,7 +233,7 @@
     /// Make a new mutiplexed request from an existing connection.
     // Throws.
     basic_request(implementation_type& impl)
- : basic_io_object<service_type>(impl.service_->io_service())
+ : detail::basic_io_object<service_type>(impl.service_->io_service())
     {
       set_protocol_service(*impl.service_);
       boost::system::error_code ec;
@@ -236,7 +245,7 @@
     /// Make a new mutiplexed request from an existing connection.
     // Won't throw.
     basic_request(implementation_type& impl, boost::system::error_code& ec)
- : basic_io_object<service_type>(impl.service_->io_service())
+ : detail::basic_io_object<service_type>(impl.service_->io_service())
     {
       set_protocol_service(*impl.service_);
       this->service.begin_request_helper(this->implementation
@@ -266,6 +275,11 @@
       return pointer(new self_type(ps));
     }
 
+ static pointer create()
+ {
+ return pointer(new self_type());
+ }
+
     void set_protocol_service(protocol_service_type& ps)
     {
       this->service.set_service(this->implementation, ps);
@@ -503,13 +517,16 @@
      * Set the output sink as `stdout_`, `stderr_`, or `stdout_ | stderr_`
      */
     /*
- void set_output(cgi::sink dest, boost::system::error_code& ec)
+ void set_output(BOOST_CGI_NAMESPACE::sink dest, boost::system::error_code& ec)
     {
       this->service(this->implementation, dest, ec);
     }
     */
 
- // [helper-functions for the basic CGI 1.1 meta-variables.
+ /////////////////////////////////////////////////////////
+ // Helper-functions for the basic CGI 1.1 meta-variables.
+ /////////////////////////////////////////////////////////
+
     string_type& auth_type()
     { return env["AUTH_TYPE"]; }
 
@@ -524,66 +541,133 @@
       return boost::lexical_cast<long>(cl.empty() ? "0" : cl);
     }
 
+ /// The content type of the request.
+ /**
+ * Common value: text/html.
+ */
     string_type& content_type()
     { return env["CONTENT_TYPE"]; }
 
+ /// The protocol used by the server to communicate to the script.
+ /**
+ * Common value: CGI/1.1.
+ */
     string_type& gateway_interface()
     { return env["GATEWAY_INTERFACE"]; }
 
+ /// Additional information, appendended to the script.
     common::path_info path_info()
     { return env["PATH_INFO"]; }
 
+ /// The translated version of the path info.
+ /**
+ * Your HTTP server may provide this, depending on configuration.
+ * The path info can represent a resource on the local file system.
+ */
     string_type& path_translated()
     { return env["PATH_TRANSLATED"]; }
 
+ /// The query string for the request.
+ /**
+ * This is the part of the request URI after a '?'. A GET request
+ * passes request parameters, URL encoded in the query string.
+ */
     string_type& query_string()
     { return env["QUERY_STRING"]; }
 
+ /// The host address of the remote user.
     string_type& remote_addr()
     { return env["REMOTE_ADDR"]; }
 
+ /// The host name of the remote user's machine.
     string_type& remote_host()
     { return env["REMOTE_HOST"]; }
 
+ /// The user making the request.
     string_type& remote_ident()
     { return env["REMOTE_IDENT"]; }
 
+ /// The userid of the person accessing the script.
     string_type& remote_user()
     { return env["REMOTE_USER"]; }
 
+ /// The method of the request.
+ /**
+ * Common values: `GET`, `POST`, `HEAD`.
+ */
     string_type& method()
     { return env["REQUEST_METHOD"]; }
 
+ /// The method of the request (long-hand of `method()`).
+ /**
+ * Common values: `GET`, `POST`, `HEAD`.
+ */
     string_type& request_method()
     { return env["REQUEST_METHOD"]; }
 
- string_type& url()
- { return env["REQUEST_URL"]; }
-
- string_type& request_url()
- { return env["REQUEST_URL"]; }
+ /// Get the URI of the request.
+ string_type& uri()
+ { return env["REQUEST_URI"]; }
+
+ /// Get the URI of the request (long-hand of `uri()`).
+ string_type& request_uri()
+ { return env["REQUEST_URI"]; }
 
+ /// The name of the script.
     string_type& script_name()
     { return env["SCRIPT_NAME"]; }
 
+ /// The URL of the script.
     string_type& script_url()
     { return env["SCRIPT_URL"]; }
 
+ /// The full URI of the script.
     string_type& script_uri()
     { return env["SCRIPT_URI"]; }
 
+ /// Get the name of the server.
+ /**
+ * Usually set in your HTTP configuration. This could be the name
+ * of a virtual host.
+ */
     string_type& server_name()
     { return env["SERVER_NAME"]; }
 
+ /// Get the port the calling server is listening on.
+ /**
+ * Common value: 80.
+ */
     string_type& server_port()
     { return env["SERVER_PORT"]; }
 
+ /// Get the protocol being used by the calling server.
+ /**
+ * Common value: HTTP/1.1.
+ */
     string_type& server_protocol()
     { return env["SERVER_PROTOCOL"]; }
 
+ /// Get a string identifying the calling server.
+ /**
+ * CGI scripts are generally called by a web-facing HTTP server.
+ * When set, this string can be useful for knowing what is calling
+ * the script, especially in a multi-server or load balanced
+ * environment.
+ */
     string_type& server_software()
     { return env["SERVER_SOFTWARE"]; }
-
+
+ /// Get the web page the user came from.
+ /**
+ * HTTP equivalent: `HTTP_REFERER`
+ *
+ * The referer is commonly used for tracking user's movements and
+ * origins. For instance, some sites use this to highlight some
+ * keywords on the page when users come from a search engine.
+ *
+ * Note that you cannot ever guarantee on this value being either set
+ * or accurate.
+ */
     string_type& referer()
     { return env["HTTP_REFERER"]; }
     // -- end helper-functions]
@@ -599,6 +683,10 @@
 
       return match[1];
     }
+
+ /// The email of the user making the request.
+ string_type& http_from ()
+ { return env["HTTP_FROM"]; }
 
     /// The role that the request is playing
     /**
@@ -606,18 +694,29 @@
      *
      * In some cases - for instance with FastCGI - the role type can be
      * different
- * eg. authorizer, or filter.
+ * eg. `authorizer`, or `filter`.
      */
     role_type& role()
     {
       return this->service.get_role(this->implementation);
     }
 
+ /// Get a hashed interpretation of the request.
+ /**
+ * You cannot consider this completely unique to each
+ * request, but it should be quite useful anyway.
+ * You can use this for logging or tracking, for example.
+ */
     std::size_t hash()
     {
       return boost::hash<self_type>()(*this);
     }
 
+ /// Set the status of a request.
+ /**
+ * The usual way to set the request status is to set it
+ * when calling `close`.
+ */
     void set_status(common::http::status_code const& status)
     {
       this->service.set_status(this->implementation, status);
@@ -636,7 +735,7 @@
    }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 
@@ -649,4 +748,3 @@
   - The user should supply an abort_handler-derived function if they want
     any special handling of aborted requests
 */
-

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_request_acceptor.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_request_acceptor.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/basic_request_acceptor.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -19,10 +19,10 @@
 #include "boost/cgi/detail/throw_error.hpp"
 #include "boost/cgi/common/basic_protocol_service.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
- /// The interface class for any *cgi::acceptor.
+ /// The interface class for any *BOOST_CGI_NAMESPACE::acceptor.
   template<typename RequestAcceptorService>
   class basic_request_acceptor
     : public boost::asio::basic_io_object<RequestAcceptorService>
@@ -287,7 +287,7 @@
   };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_BASIC_REQUEST_ACCEPTOR_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,6 +9,8 @@
 #ifndef CGI_CGI_HPP_INCLUDED__
 #define CGI_CGI_HPP_INCLUDED__
 
+#include "boost/cgi/config.hpp"
+
 // Include all cgi-related headers only.
 #include "boost/cgi/cgi/request.hpp"
 #include "boost/cgi/cgi/service.hpp"
@@ -16,20 +18,12 @@
 // Include headers common to all protocols
 #include "boost/cgi/detail/common_headers.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   typedef cgi_request request;
- //typedef cgi::cgi_service service; // to be added
+ using namespace common;
+ //typedef BOOST_CGI_NAMESPACE::cgi_service service; // to be added
   
-} // namespace cgi
-
-/// Dump acgi stuff into the boost namespace
-namespace boost {
- namespace cgi {
- using namespace ::cgi::cgi;
- using namespace ::cgi;
- using namespace ::cgi::common;
- } // namespace acgi
-} // namespace boost
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_CGI_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -16,16 +16,13 @@
 #include "boost/cgi/cgi/request_impl.hpp"
 #include "boost/cgi/basic_request.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   class cgi_service_impl;
 
   typedef common::basic_request<cgi_request_service, cgi_service> cgi_request;
   typedef cgi_request request;
 
- //namespace cgi {
- // typedef cgi_request request;
- //} // namespace cgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_CGI_REQUEST_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request_impl.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -24,7 +24,7 @@
 
 // Make this ProtocolService-independent
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   // Forward declaration
   //template<typename>
@@ -66,7 +66,7 @@
     friend class cgi_service_impl;
   };
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_CGI_REQUEST_IMPL_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/request_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -19,7 +19,7 @@
 #include "boost/cgi/detail/extract_params.hpp"
 #include "boost/cgi/detail/cgi_service_impl_base.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   //class cgi_request_impl;
 
@@ -53,6 +53,6 @@
     }
   };
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_CGI_SERVICE_IMPL_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/cgi/service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -14,7 +14,7 @@
 #include "boost/cgi/connections/async_stdio.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   /// typedef for typical usage
   /**
@@ -39,6 +39,6 @@
   };
   */
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_CGI_SERVICE_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/basic_protocol_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/basic_protocol_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/basic_protocol_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -21,8 +21,9 @@
 #include "boost/cgi/detail/protocol_traits.hpp"
 #include "boost/cgi/common/io_service_provider.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   /// Basic Protocol Service
@@ -114,7 +115,7 @@
      * The order in which the underlying io_services are returned is determined
      * by what policy the IoServiceProvider uses.
      */
- ::cgi::common::io_service& io_service()
+ ::BOOST_CGI_NAMESPACE::common::io_service& io_service()
     {
       return ios_provider_.get_io_service();
     }
@@ -153,6 +154,6 @@
   };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_BASIC_PROTOCOL_SERVICE_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/commit.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/commit.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/commit.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -7,8 +7,10 @@
 ///////////////////////////////////////////////////////////
 #include "boost/cgi/common/return.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
+#include "boost/cgi/config.hpp"
+
+BOOST_CGI_NAMESPACE_BEGIN
 
-namespace cgi {
  namespace common {
 
     /// Send a response to a reqest and close off the request.
@@ -31,7 +33,7 @@
     }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_COMMIT_HPP_INCLUDED_
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/connection_base.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/connection_base.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/connection_base.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,7 +9,9 @@
 #ifndef CGI_CONNECTION_BASE_HPP_INCLUDED__
 #define CGI_CONNECTION_BASE_HPP_INCLUDED__
 
-namespace cgi {
+#include "boost/cgi/config.hpp"
+
+BOOST_CGI_NAMESPACE_BEGIN
 
   /// Abstract Base Class for all connection types
   class connection_base
@@ -35,6 +37,6 @@
     //~connection_base() { }
   };
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_CONNECTION_BASE_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/cookie.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/cookie.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/cookie.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,10 +12,12 @@
 #include <string>
 #include <boost/system/error_code.hpp>
 #include <boost/tokenizer.hpp>
+#include "boost/cgi/config.hpp"
 
 #define BOOST_CGI_DATE_IN_THE_PAST "Fri, 05-Jun-1989 15:30:00 GMT"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
+
  namespace common {
 
   template<typename CharT> struct basic_cookie;
@@ -27,8 +29,8 @@
   /// A `basic_cookie<>` object that can be (out-) streamed
   /**
    * Either set the parameters in the constructor, or set them directly.
- * Note: If you want to set the parameters individually, remember that each
- * parameter must NOT have a trailing semi-colon!
+ * Note: If you want to set the parameters individually, remember that
+ * each parameter must NOT have a trailing semi-colon!
    *
    * TODO
    * - Data should be URL-encoded, or maybe provide an overload for url_decode
@@ -77,6 +79,7 @@
     string_type expires;
     string_type path;
     string_type domain;
+ /// `true` iff the cookie is only used for secure connections.
     bool secure;
     bool http_only;
 
@@ -125,7 +128,7 @@
     }
     */
 
- /// Make a string out of the cookie
+ /// Make a string out of the cookie.
     string_type to_string() const
     {
       string_type str(name + "=" + value);
@@ -141,11 +144,11 @@
   };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 /*
 template<typename OutStream, typename CharT>
-inline OutStream& operator<< (OutStream& os, cgi::common::basic_cookie<CharT> const& ck)
+inline OutStream& operator<< (OutStream& os, BOOST_CGI_NAMESPACE::common::basic_cookie<CharT> const& ck)
 {
   os<< ck.to_string();
   return os;

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/error.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/error.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/error.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -18,8 +18,9 @@
 
 #include <string>
 #include <boost/system/error_code.hpp>
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
   namespace error {
 
@@ -45,9 +46,12 @@
   // **FIXME**
   broken_pipe,
 
- // **FIXME**
+ // **TODO** Document
   bad_read,
 
+ // **TODO** Document
+ bad_write,
+
   // A client wasn't able to open.
   client_not_open,
   
@@ -114,16 +118,18 @@
 }
 
 static const boost::system::error_category& cgi_category
- = ::cgi::common::error::get_cgi_category();
+ = ::BOOST_CGI_NAMESPACE::common::error::get_cgi_category();
 
   } // namespace error
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 namespace boost {
   namespace system {
 
- template<> struct is_error_code_enum< ::cgi::common::error::cgi_errors>
+ template<> struct is_error_code_enum<
+ ::BOOST_CGI_NAMESPACE::common::error::cgi_errors
+ >
     {
       BOOST_STATIC_CONSTANT(bool, value = true);
     };
@@ -131,7 +137,7 @@
   } // namespace system
 } // namespace boost
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
   namespace error {
   
@@ -143,6 +149,6 @@
 
   } // namespace error
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_COMMON_ERROR_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/form_parser.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/form_parser.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/form_parser.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -24,16 +24,18 @@
 ///////////////////////////////////////////////////////////
 #include "boost/cgi/common/map.hpp"
 #include "boost/cgi/common/form_part.hpp"
+#include "boost/cgi/config.hpp"
 
 /// Set the directory that uploads are stored in.
 /**
  * When files are uploaded, using multipart/form-data, uploaded
  * files are saved to disk, rather than being held in memory.
  *
- * This macro determines where uploaded files are stored.
+ * This macro determines where uploaded files are stored. It must
+ * include a trailing slash (eg. "../upload/", which is the default).
  *
- * You must ensure the user that your web server runs as has read and
- * write permissions to this directory. You should never allow this to
+ * Your web server must run as a user that has read and write
+ * permissions to this directory. You should never allow this to
  * be the same directory the FastCGI script is running in, or any
  * directory containing executable files.
  */
@@ -41,10 +43,28 @@
 # define BOOST_CGI_UPLOAD_DIRECTORY "../upload/"
 #endif // BOOST_CGI_UPLOAD_DIRECTORY
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
- /// Destined for better things than an implementation detail (hopefully).
+ /// A class for parsing POST data sent to a CGI process.
+ /**
+ * Construct this and then call `form_parser::parse` with an
+ * instance of form_parser::context (or compatible struct).
+ *
+ * This is minimal and doesn't extract all meta-data yet, but
+ * is known to work on Windows XP with MSVC9.0 and Ubuntu linux
+ * with gcc 4.2.x and 4.3.x.
+ *
+ * Valid Form Encodings
+ * > `application/x-www-form-urlencoded`
+ * > `multipart/form-data`
+ *
+ * File uploads (ie. in `multipart/form-data` forms) are saved
+ * to disk. See the `BOOST_CGI_UPLOAD_DIRECTORY` macro.
+ *
+ * Should also work for HTTP POST data.
+ *
+ */
   class form_parser
   {
   public:
@@ -132,7 +152,8 @@
   };
 
  } // namespace detail
-} // namespace cgi
+
+BOOST_CGI_NAMESPACE_END
 
 //#ifndef BOOST_CGI_BUILD_LIB
 # include "boost/cgi/impl/form_parser.ipp"

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/form_part.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/form_part.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/form_part.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -5,8 +5,9 @@
 #include <vector>
 #include <string>
 #include <boost/range.hpp>
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    struct form_part
@@ -60,7 +61,7 @@
    };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_FORM_PART_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/header.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/header.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/header.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,8 +11,9 @@
 
 #include <string>
 #include <boost/lexical_cast.hpp>
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    template<typename CharT> struct basic_header;
@@ -56,6 +57,10 @@
      operator string_type () {
         return content + "\r\n";
      }
+
+// const_buffer_type data() {
+// return boost::asio::buffer(
+// }
 
      string_type content;
    };
@@ -166,7 +171,7 @@
    //}
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_HEADER_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/io_service_provider.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/io_service_provider.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/io_service_provider.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -19,8 +19,9 @@
 ///////////////////////////////////////////////////////////
 #include "boost/cgi/import/io_service.hpp"
 #include "boost/cgi/fwd/io_service_provider_fwd.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   /// Hold a set number of io_services and return them based on the Policy
@@ -53,7 +54,7 @@
     {
     }
 
- ::cgi::common::io_service&
+ ::BOOST_CGI_NAMESPACE::common::io_service&
       get_io_service()
     {
       return io_service_;
@@ -74,7 +75,7 @@
       io_service_.reset();
     }
   private:
- ::cgi::common::io_service io_service_;
+ ::BOOST_CGI_NAMESPACE::common::io_service io_service_;
   };
 
 
@@ -83,7 +84,7 @@
   class io_service_provider<tags::service_pool>
   {
   public:
- typedef std::list<cgi::io_service> impl_type;
+ typedef std::list<BOOST_CGI_NAMESPACE::io_service> impl_type;
 
     io_service_provider(int pool_size)
       : io_services_(pool_size)
@@ -91,7 +92,7 @@
     {
     }
 
- cgi::io_service& io_service()
+ BOOST_CGI_NAMESPACE::io_service& io_service()
     {
       return boost::ref(*current_++);
     }
@@ -99,19 +100,19 @@
     void run()
     {
       std::for_each(io_services_.begin(), io_services_.end()
- , boost::bind(&cgi::io_service::run, boost::ref(_1)));
+ , boost::bind(&BOOST_CGI_NAMESPACE::io_service::run, boost::ref(_1)));
     }
 
     void stop()
     {
       std::for_each(io_services_.begin(), io_services_.end()
- , boost::bind(&cgi::io_service::stop, boost::ref(_1)));
+ , boost::bind(&BOOST_CGI_NAMESPACE::io_service::stop, boost::ref(_1)));
     }
 
     void reset()
     {
       std::for_each(io_services_.begin(), io_services_.end()
- , boost::bind(&cgi::io_service::reset, boost::ref(_1)));
+ , boost::bind(&BOOST_CGI_NAMESPACE::io_service::reset, boost::ref(_1)));
     }
 
     impl_type& impl()
@@ -269,7 +270,7 @@
  // **FIXME**
  using common::io_service_provider;
   
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/is_async.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/is_async.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/is_async.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,8 +12,9 @@
 #include <boost/mpl/bool.hpp>
 ///////////////////////////////////////////////////////////
 #include "boost/cgi/common/tags.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    template<typename Protocol>
@@ -31,7 +32,7 @@
    };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_COMMON_IS_ASYNC_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/map.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/map.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/map.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,11 +9,13 @@
 # define BOOST_CGI_SESSION_MAP_TYPE map
 #endif // BOOST_CGI_SESSION_MAP_TYPE
 
-namespace cgi {
+#include "boost/cgi/config.hpp"
+
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
- typedef std::map< ::cgi::common::name, std::string> map;
- typedef std::multimap< ::cgi::common::name, std::string> multimap;
+ typedef std::map< ::BOOST_CGI_NAMESPACE::common::name, std::string> map;
+ typedef std::multimap< ::BOOST_CGI_NAMESPACE::common::name, std::string> multimap;
 
    /**
     * If you want to add a new data type to a request you need to:
@@ -31,7 +33,7 @@
   typedef map session_map;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_COMMON_MAP_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/name.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/name.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/name.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -17,8 +17,9 @@
 #include <ostream>
 #include <cstdlib>
 #include <ctype.h>
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    template <typename CharT>
@@ -75,7 +76,7 @@
   }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_COMMON_NAME_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/parse_options.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/parse_options.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/parse_options.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -1,8 +1,9 @@
 
 #ifndef BOOST_CGI_COMMON_PARSE_OPTIONS_HPP_INCLUDED_
 #define BOOST_CGI_COMMON_PARSE_OPTIONS_HPP_INCLUDED_
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    // Parser options for loading requests. Note that you should *always*
@@ -25,7 +26,7 @@
    };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_COMMON_PARSE_OPTIONS_HPP_INCLUDED_
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/path_info.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/path_info.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/path_info.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -7,8 +7,9 @@
 #include <boost/algorithm/string/classification.hpp>
 ///////////////////////////////////////////////////////////
 #include "boost/cgi/fwd/basic_request_fwd.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    struct path_info
@@ -20,16 +21,14 @@
 
      template<typename S, typename P, typename A>
      path_info(basic_request<S,P,A> & request)
- : value(boost::algorithm::trim_copy_if(request.env["path_info"],
- boost::algorithm::is_any_of("/")))
+ : value(request.env["path_info"])
      {
              boost::algorithm::split(
            parts, value, boost::algorithm::is_any_of("/"));
      }
 
      path_info(value_type const& str)
- : value(boost::algorithm::trim_copy_if(
- str, boost::algorithm::is_any_of("/")))
+ : value(str)
      {
              boost::algorithm::split(
            parts, value, boost::algorithm::is_any_of("/"));
@@ -37,6 +36,10 @@
      
      value_type& operator[](int i) { return parts[i]; }
      
+ value_type& str() { return value; }
+
+ operator value_type& () { return value; }
+
      iterator begin() { return parts.begin(); }
      iterator end() { return parts.end(); }
      const_iterator begin() const { return parts.begin(); }
@@ -47,7 +50,7 @@
    };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_COMMON_PATH_INFO_HPP_INCLUDED_
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_acceptor_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_acceptor_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_acceptor_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,8 +12,9 @@
 #include "boost/cgi/detail/throw_error.hpp"
 #include "boost/cgi/detail/service_base.hpp"
 #include "boost/cgi/detail/protocol_traits.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   template<typename Protocol>
   class request_acceptor_service
@@ -96,6 +97,6 @@
     // basic_protocol_service<protocol_type>& pservice_;
   };
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_REQUEST_ACCEPTOR_SERVICE_HPP_INCLUDED

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_base.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_base.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_base.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -24,8 +24,9 @@
 #include "boost/cgi/common/parse_options.hpp"
 #include "boost/cgi/detail/extract_params.hpp"
 #include "boost/cgi/detail/save_environment.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   /// ABC that defines the common interface for basic_request<>s
@@ -233,7 +234,7 @@
   };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_COMMON_REQUEST_BASE_HPP_INCLUDE_
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -17,8 +17,9 @@
 #include "boost/cgi/detail/service_base.hpp"
 #include "boost/cgi/detail/protocol_traits.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   /// The generic service class for basic_request<>s
@@ -44,7 +45,7 @@
     typedef Protocol protocol_type;
     typedef common::basic_protocol_service<Protocol> protocol_service_type;
 
- request_service(::cgi::common::io_service& ios)
+ request_service(::BOOST_CGI_NAMESPACE::common::io_service& ios)
       : detail::service_base<request_service<Protocol> >(ios)
       , service_impl_(boost::asio::use_service<service_impl_type>(ios))
     {
@@ -153,7 +154,7 @@
   };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_status.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_status.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/request_status.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -8,8 +8,9 @@
 ////////////////////////////////////////////////////////////////
 #ifndef CGI_COMMON_REQUEST_STATUS_HPP_INCLUDED__
 #define CGI_COMMON_REQUEST_STATUS_HPP_INCLUDED__
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    enum request_status
@@ -25,7 +26,7 @@
      };
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_COMMON_REQUEST_STATUS_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/response.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/response.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/response.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -23,9 +23,9 @@
 #include "boost/cgi/import/streambuf.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
 #include "boost/cgi/fwd/basic_request_fwd.hpp"
+#include "boost/cgi/config.hpp"
 
-
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   /// The response class: a helper for responding to requests.
@@ -45,7 +45,7 @@
      * Takes the buffer and uses it internally, does nothing with it on
      * destruction.
      */
- basic_response(::cgi::common::streambuf* buf,
+ basic_response(::BOOST_CGI_NAMESPACE::common::streambuf* buf,
         common::http::status_code sc = common::http::ok);
 
     ~basic_response();
@@ -192,44 +192,29 @@
 
    /// Typedefs for typical usage.
    typedef basic_response<char> response;
- typedef basic_response<wchar_t> wresponse; // **FIXME** (untested)
-
- /*
- std::basic_ostream<char_type>& operator<<(std::basic_ostream<char_type>&, self_type& resp)
- {
- os<< "**response**";
- return os;
- }
-
- template<typename CharT>
- basic_response<CharT>&
- basic_response<CharT>::operator<< (ostream_type& (*func)(ostream_type&))
- {
- ostream_<< func; return *this;
- }
- */
+ typedef basic_response<wchar_t> wresponse; // **TODO** (untested)
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 
 
   /// Generic ostream template
   template<typename CharT, typename T>
- cgi::common::basic_response<CharT>&
- operator<< (cgi::common::basic_response<CharT>& resp, T const& t);
+ BOOST_CGI_NAMESPACE::common::basic_response<CharT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<CharT>& resp, T const& t);
 
   template<typename CharT>
- cgi::common::basic_response<CharT>&
- operator<< (cgi::common::basic_response<CharT>& resp
- , cgi::common::basic_header<CharT> const& hdr);
+ BOOST_CGI_NAMESPACE::common::basic_response<CharT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<CharT>& resp
+ , BOOST_CGI_NAMESPACE::common::basic_header<CharT> const& hdr);
 
   template<typename CharT>
- cgi::common::basic_response<CharT>&
- operator<< (cgi::common::basic_response<CharT>& resp
- , cgi::common::charset_header<CharT> const& hdr);
+ BOOST_CGI_NAMESPACE::common::basic_response<CharT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<CharT>& resp
+ , BOOST_CGI_NAMESPACE::common::charset_header<CharT> const& hdr);
 
- /// You can stream a cgi::cookie into a response.
+ /// You can stream a BOOST_CGI_NAMESPACE::cookie into a response.
   /**
    * This is just a shorthand way of setting a header that will set a
    * client-side cookie.
@@ -241,34 +226,19 @@
    * library.
    */
   template<typename charT>
- cgi::common::basic_response<charT>&
- operator<< (cgi::common::basic_response<charT>&
- , cgi::common::basic_cookie<charT>);
+ BOOST_CGI_NAMESPACE::common::basic_response<charT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<charT>&
+ , BOOST_CGI_NAMESPACE::common::basic_cookie<charT>);
                
-/*
- template<typename charT, typename T>
- cgi::common::basic_response<charT>&
- operator<< (cgi::common::basic_response<charT>&
- , cgi::common::basic_cookie<T> const&);
-*/
   template<typename charT, typename T>
- cgi::common::basic_response<charT>&
- operator<< (cgi::common::basic_response<charT>&
- , cgi::common::http::status_code);
+ BOOST_CGI_NAMESPACE::common::basic_response<charT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<charT>&
+ , BOOST_CGI_NAMESPACE::common::http::status_code);
 
   template<typename charT, typename T>
- cgi::common::basic_response<charT>&
- operator<< (cgi::common::basic_response<charT>&
- , cgi::common::basic_response<charT>&);
-/*
-inline std::ostream& operator<<(
-std::ios& (*func)(std::ios&)
-){return std::cout << func;};
-inline std::ostream& operator<<(
-std::ios_base& (*func)(std::ios_base&)
-){return std::cout << func;};
-};
-*/
+ BOOST_CGI_NAMESPACE::common::basic_response<charT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<charT>&
+ , BOOST_CGI_NAMESPACE::common::basic_response<charT>&);
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/return.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/return.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/return.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -20,8 +20,9 @@
 
 #include "boost/cgi/common/response.hpp"
 #include "boost/cgi/basic_request.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    template<typename Response, typename Request>
@@ -38,7 +39,7 @@
    }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 /// If an error occurs during the sending or closing then `status` will be
 // incremented by the value of this macro.
@@ -47,17 +48,17 @@
 #endif
 
 #define BOOST_CGI_RETURN(response, request, status) \
- if ( ::cgi::common::return_helper(response, request, status)) \
+ if ( ::BOOST_CGI_NAMESPACE::common::return_helper(response, request, status)) \
             /** error **/ \
             return status + BOOST_CGI_RETURN_ERROR_INCREMENT; \
           return status;
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
 #define return_(response, request, status) BOOST_CGI_RETURN(response, request, status)
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_RETURN_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/role_type.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/role_type.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/role_type.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -1,8 +1,10 @@
 #ifndef CGI_ROLE_TYPE_HPP_INCLUDED__
 #define CGI_ROLE_TYPE_HPP_INCLUDED__
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
- namespace role {
+BOOST_CGI_NAMESPACE_BEGIN
+ namespace common {
+ namespace role {
 
    struct responder {};
    struct authorizer {};
@@ -17,6 +19,7 @@
   , filter
   };
 
-} // namespace cgi
+ } // namespace common
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_ROLE_TYPE_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/source_enums.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/source_enums.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/source_enums.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -4,9 +4,10 @@
 
 #include <boost/fusion/include/at.hpp>
 ///////////////////////////////////////////////////////////
+#include "boost/cgi/config.hpp"
 #include "boost/cgi/common/map.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    /// Types of data sources and related enums.
@@ -53,7 +54,7 @@
    }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_COMMON_SOURCE_ENUMS_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/tags.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/tags.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/common/tags.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -13,7 +13,9 @@
 #pragma once
 #endif
 
-namespace cgi {
+#include "boost/cgi/config.hpp"
+
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    /// SCGI (note, this must be removed)
@@ -48,6 +50,6 @@
 
   } // namespace tags
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_TAGS_HPP_INCLUDED__

Added: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/config.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/config.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -0,0 +1,28 @@
+// -- form_parser.hpp --
+//
+// Copyright (c) Darren Garvey 2007.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+////////////////////////////////////////////////////////////////
+#ifndef BOOST_CGI_CONFIG_HPP_INCLUDED__
+#define BOOST_CGI_CONFIG_HPP_INCLUDED__
+
+namespace boost {
+ namespace cgi {}
+} // namespace boost
+
+#ifndef BOOST_CGI_NAMESPACE
+# define BOOST_CGI_NAMESPACE boost::cgi
+#endif // BOOST_CGI_NAMESPACE
+
+#ifndef BOOST_CGI_NAMESPACE_BEGIN
+# define BOOST_CGI_NAMESPACE_BEGIN namespace boost { namespace cgi {
+#endif // BOOST_CGI_NAMESPACE_BEGIN
+
+#ifndef BOOST_CGI_NAMESPACE_END
+# define BOOST_CGI_NAMESPACE_END } } // namespace BOOST_CGI_NAMESPACE
+#endif // BOOST_CGI_NAMESPACE_END
+
+#endif // BOOST_CGI_CONFIG_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/async_stdio.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/async_stdio.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/async_stdio.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -18,7 +18,7 @@
 #include "boost/cgi/connections/stdio.hpp"
 #include "boost/cgi/import/io_service.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   // Asynchronous access to stdio
@@ -47,7 +47,7 @@
       is_open_ = false;
     }
 
- static pointer create(::cgi::common::io_service& ios)
+ static pointer create(::BOOST_CGI_NAMESPACE::common::io_service& ios)
     {
       return pointer(new basic_connection<tags::async_stdio>(ios));
     }
@@ -119,7 +119,7 @@
     }
 
   private:
- ::cgi::common::io_service& io_service_;
+ ::BOOST_CGI_NAMESPACE::common::io_service& io_service_;
   };
 
  } // namespace common
@@ -128,6 +128,6 @@
     typedef common::basic_connection<common::tags::async_stdio> async_stdio;
   } // namespace connections
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_ASYNC_STDIO_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/shareable_tcp_socket.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/shareable_tcp_socket.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/shareable_tcp_socket.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -27,7 +27,7 @@
 
 #include "boost/cgi/detail/protocol_traits.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   /*** 05.02.2008 :
@@ -54,7 +54,7 @@
     typedef boost::asio::ip::tcp::socket next_layer_type;
 
     /** FastCGI specific stuff **/
- //typedef ::cgi::fcgi::client client_type;
+ //typedef ::BOOST_CGI_NAMESPACE::fcgi::client client_type;
     typedef //typename
       detail::protocol_traits<fcgi_>::request_type request_type;
     typedef
@@ -217,7 +217,7 @@
       common::tags::shareable_tcp_socket> shareable_tcp;
   } // namespace connections
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/stdio.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/stdio.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/stdio.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,8 +11,14 @@
 
 #include <cstdio>
 #include <string>
-//#include <io.h>
-#include <fcntl.h>
+# include <stdio.h> // for _setmode
+# include <io.h> // for _setmode
+# include <fcntl.h> // for _setmode
+#if BOOST_WINDOWS
+# include <stdio.h> // for _setmode
+# include <io.h> // for _setmode
+# include <fcntl.h> // for _setmode
+#endif // BOOST_WINDOWS
 ///////////////////////////////////////////////////////////
 #include <boost/system/error_code.hpp>
 #include <boost/asio.hpp>
@@ -23,7 +29,7 @@
 #include "boost/cgi/common/connection_base.hpp"
 #include "boost/cgi/fwd/basic_connection_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   template<>
@@ -85,12 +91,12 @@
       }
 
       if (std::feof(stdin))
- ec = ::cgi::error::eof;
+ ec = ::BOOST_CGI_NAMESPACE::error::eof;
       else
       if (std::ferror(stdin))
- ec = ::cgi::error::bad_read;
+ ec = ::BOOST_CGI_NAMESPACE::error::bad_read;
       else
- ec = ::cgi::error::broken_pipe;
+ ec = ::BOOST_CGI_NAMESPACE::error::broken_pipe;
 
       return 0;
     }
@@ -111,7 +117,7 @@
         //int ret(fputs(boost::asio::buffer_cast<const char*>(*i), stdout));
         //if (ret == EOF)
         //{
- // return ::cgi::error::broken_pipe;
+ // return ::BOOST_CGI_NAMESPACE::error::broken_pipe;
         //}
         //std::cerr<< "[buf] "
         // << std::string(boost::asio::buffer_cast<const char*>(*i), buf_len)
@@ -120,12 +126,12 @@
                        , buf_len, 1, stdout))
         {
           if (std::feof(stdout))
- ec = ::cgi::error::eof;
+ ec = ::BOOST_CGI_NAMESPACE::error::eof;
           else
           if (std::ferror(stdout))
- ec = ::cgi::error::bad_write;
+ ec = ::BOOST_CGI_NAMESPACE::error::bad_write;
           else
- ec = ::cgi::error::broken_pipe;
+ ec = ::BOOST_CGI_NAMESPACE::error::broken_pipe;
         }
       }
       return bytes_transferred;
@@ -141,6 +147,6 @@
     typedef common::basic_connection<common::tags::stdio> stdio;
   } // namespace connections
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_STDIO_CONNECTION_IMPL_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/tcp_socket.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/tcp_socket.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/connections/tcp_socket.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -18,7 +18,7 @@
 #include "boost/cgi/detail/push_options.hpp"
 #include "boost/cgi/common/connection_base.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   template<>
@@ -102,7 +102,7 @@
     typedef common::basic_connection<common::tags::tcp_socket> tcp;
   } // namespace connections
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Added: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/basic_io_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/basic_io_object.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -0,0 +1,168 @@
+// -- detail/basic_io_object.hpp --
+//
+// Copyright (c) Darren Garvey 2007.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+////////////////////////////////////////////////////////////////
+#ifndef CGI_DETAIL_BASIC_IO_OBJECT_HPP_INCLUDED__
+#define CGI_DETAIL_BASIC_IO_OBJECT_HPP_INCLUDED__
+
+#include <boost/asio/basic_io_object.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include "boost/cgi/common/is_async.hpp"
+#include "boost/cgi/common/tags.hpp"
+
+BOOST_CGI_NAMESPACE_BEGIN
+
+ namespace detail {
+
+ template<typename Service, typename Enable = void>
+ class basic_io_object
+ : private boost::noncopyable
+ {
+ public:
+ typedef Service service_type;
+ typedef typename service_type::implementation_type implementation_type;
+
+ /// Get the io_service associated with the object.
+ /**
+ * This function may be used to obtain the io_service object that the I/O
+ * object uses to dispatch handlers for asynchronous operations.
+ *
+ * @return A reference to the io_service object that the I/O object will
+ * use to dispatch handlers. Ownership is not transferred to the caller.
+ */
+ boost::asio::io_service& get_io_service()
+ {
+ return service.get_io_service();
+ }
+
+ protected:
+ explicit basic_io_object()
+ {
+ service.construct(implementation);
+ }
+
+ ~basic_io_object()
+ {
+ service.destroy(implementation);
+ }
+
+ service_type service;
+ implementation_type implementation;
+ };
+
+ /// basic_io_object alternative when an io_service isn't used
+ template<typename Service>
+ class basic_io_object<
+ Service,
+ typename boost::enable_if<
+ boost::mpl::and_<
+ common::is_async<typename Service::protocol_type>,
+ boost::mpl::not_<
+ boost::is_same<
+ typename Service::protocol_type, tags::acgi
+ >
+ >
+ >
+ >::type
+ >
+ : private boost::noncopyable
+ {
+ public:
+ typedef Service service_type;
+ typedef typename Service::implementation_type implementation_type;
+
+ /// Get the io_service associated with the object.
+ /**
+ * This function may be used to obtain the io_service object that the I/O
+ * object uses to dispatch handlers for asynchronous operations.
+ *
+ * @return A reference to the io_service object that the I/O object will
+ * use to dispatch handlers. Ownership is not transferred to the caller.
+ */
+ boost::asio::io_service& get_io_service()
+ {
+ return service.get_io_service();
+ }
+
+ protected:
+ /// Construct a basic_io_object.
+ /**
+ * Performs:
+ * @code service.construct(implementation); @endcode
+ */
+ explicit basic_io_object(boost::asio::io_service& io_service)
+ : service(boost::asio::use_service<service_type>(io_service))
+ {
+ service.construct(implementation);
+ }
+
+ ~basic_io_object()
+ {
+ service.destroy(implementation);
+ }
+
+ service_type& service;
+ implementation_type implementation;
+ };
+
+ /// basic_io_object alternative when an io_service isn't used
+ template<typename Service>
+ class basic_io_object<
+ Service,
+ typename boost::enable_if<
+ boost::is_same<
+ typename Service::protocol_type, tags::acgi
+ >
+ >::type
+ >
+ : private boost::noncopyable
+ {
+ public:
+ typedef Service service_type;
+ typedef typename Service::implementation_type implementation_type;
+
+ /// Get the io_service associated with the object.
+ /**
+ * This function may be used to obtain the io_service object that the I/O
+ * object uses to dispatch handlers for asynchronous operations.
+ *
+ * @return A reference to the io_service object that the I/O object will
+ * use to dispatch handlers. Ownership is not transferred to the caller.
+ */
+ boost::asio::io_service& get_io_service()
+ {
+ return service.get_io_service();
+ }
+
+ protected:
+ /// Construct a basic_io_object.
+ /**
+ * Performs:
+ * @code service.construct(implementation); @endcode
+ */
+ explicit basic_io_object()
+ : ios()
+ , service(boost::asio::use_service<service_type>(ios))
+ {
+ service.construct(implementation);
+ }
+
+ ~basic_io_object()
+ {
+ service.destroy(implementation);
+ }
+
+ boost::asio::io_service ios;
+ service_type& service;
+ implementation_type implementation;
+ };
+
+ } // namespace detail
+BOOST_CGI_NAMESPACE_END
+
+#endif // CGI_DETAIL_BASIC_IO_OBJECT_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/basic_sync_io_object.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/basic_sync_io_object.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/basic_sync_io_object.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,7 +11,7 @@
 
 #include <boost/noncopyable.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
   /// basic_io_object alternative when an io_service isn't used
@@ -39,7 +39,7 @@
   };
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_DETAIL_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/cgi_request_impl_base.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/cgi_request_impl_base.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/cgi_request_impl_base.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -23,7 +23,7 @@
 #include "boost/cgi/connections/stdio.hpp"
 #include "boost/cgi/common/request_status.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
   //Forward declaration
@@ -42,7 +42,7 @@
     
   {
   public:
- typedef ::cgi::common::map map_type;
+ typedef ::BOOST_CGI_NAMESPACE::common::map map_type;
     typedef Connection connection_type;
     typedef
       common::basic_client<Connection, common::tags::acgi> client_type;
@@ -81,7 +81,7 @@
   };
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_CGI_REQUEST_IMPL_BASE_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/cgi_service_impl_base.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/cgi_service_impl_base.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/cgi_service_impl_base.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -35,17 +35,17 @@
 #include "boost/cgi/detail/extract_params.hpp"
 #include "boost/cgi/detail/save_environment.hpp"
 
-namespace cgi {
-// **FIXME** Wrong namespace (should be cgi::detail?).
+BOOST_CGI_NAMESPACE_BEGIN
+// **FIXME** Wrong namespace (should be BOOST_CGI_NAMESPACE::detail?).
 
   template<typename RequestImplType>
   class cgi_service_impl_base
- : public common::request_base<cgi_service_impl_base<RequestImplType> >//, struct cgi_service_impl_base<RequestImplType>::implementation_type >
+ : public common::request_base<cgi_service_impl_base<RequestImplType> >
   {
   public:
     typedef cgi_service_impl_base<RequestImplType> self_type;
     typedef common::request_base<self_type> base_type;
- typedef ::cgi::common::map map_type;
+ typedef ::BOOST_CGI_NAMESPACE::common::map map_type;
     typedef typename
       RequestImplType::protocol_type protocol_type;
 
@@ -177,7 +177,7 @@
       return ec;
     }
 
- role_type
+ common::role_type
     get_role(implementation_type& impl)
     {
       return responder;
@@ -253,7 +253,7 @@
     }
   };
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/common_headers.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/common_headers.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/common_headers.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -15,6 +15,7 @@
 #include <iostream> // **FIXME** - only for debugging info
 
 //#include "boost/cgi/logger.hpp"
+#include "boost/cgi/config.hpp"
 #include "boost/cgi/basic_request.hpp"
 #include "boost/cgi/common/header.hpp"
 #include "boost/cgi/common/map.hpp"

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/extract_params.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/extract_params.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/extract_params.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -15,14 +15,13 @@
 
 #include "boost/cgi/detail/url_decode.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
    /// Extract name/value pairs from a supplied string buffer.
    /**
- * Name / value pairs can be separated by either '&' or ';', and the format
- * of the name / value pairs is:
- * <name>=<value>
+ * Name/value pairs can be separated by either '&' or ';', and the
+ * format is: name=value
     *
     */
    template<typename String, typename Map, typename Separator>
@@ -85,6 +84,6 @@
    }
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_DETAIL_EXTRACT_PARAMS_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/protocol_traits.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/protocol_traits.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/protocol_traits.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -23,7 +23,7 @@
 #include "boost/cgi/fwd/basic_request_fwd.hpp"
 #include "boost/cgi/fwd/basic_connection_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   namespace cgi {}
   namespace acgi
@@ -90,7 +90,7 @@
 
  namespace detail {
 
- namespace tags = ::cgi::common::tags;
+ namespace tags = ::BOOST_CGI_NAMESPACE::common::tags;
 
    template<typename Protocol>
     struct protocol_traits
@@ -202,19 +202,19 @@
 
     // **FIXME** (remove)
     template<>
- struct protocol_traits< ::cgi::common::scgi_>
+ struct protocol_traits< ::BOOST_CGI_NAMESPACE::common::scgi_>
       : protocol_traits<tags::scgi>
     {
     };
 
     // **FIXME** (remove)
     template<>
- struct protocol_traits< ::cgi::common::fcgi_>
+ struct protocol_traits< ::BOOST_CGI_NAMESPACE::common::fcgi_>
       : protocol_traits<tags::fcgi>
     {
     };
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_REQUEST_TRAITS_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/push_options.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/push_options.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/push_options.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -39,3 +39,5 @@
  * currently on by default).
  */
 #define BOOST_CGI_KEEP_EMPTY_VARS
+
+#include "boost/cgi/config.hpp"

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/save_environment.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/save_environment.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/save_environment.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -23,7 +23,7 @@
 #endif
 
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
    /// Save all information from `environment` to env_map
@@ -78,6 +78,6 @@
    }
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_DETAIL_SAVE_ENVIRONMENT_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/service_base.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/service_base.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/service_base.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,12 +12,14 @@
 #ifndef CGI_DETAIL_SERVICE_ID_HPP_INCLUDED__
 #define CGI_DETAIL_SERVICE_ID_HPP_INCLUDED__
 
-#include <boost/asio/detail/push_options.hpp>
-
+#include <boost/noncopyable.hpp>
 #include <boost/asio/io_service.hpp>
+////////////////////////////////////////////////////////////////
+#include "boost/cgi/config.hpp"
 #include "boost/cgi/detail/service_id.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
+
  namespace detail {
 
    // Special service base class to keep classes header-file only.
@@ -34,13 +36,12 @@
      {
      }
    };
-
+
    template <typename Type>
    boost::asio::detail::service_id<Type> service_base<Type>::id;
 
  } // namespace detail
-} // namespace cgi
-
-#include <boost/asio/detail/pop_options.hpp>
+
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_DETAIL_SERVICE_ID_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/service_id.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/service_id.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/service_id.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -16,7 +16,7 @@
 
 #include <boost/asio/io_service.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
    // Special derived service id type to keep classes header-file only.
@@ -27,7 +27,7 @@
   };
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include <boost/asio/detail/pop_options.hpp>
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/throw_error.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/throw_error.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/throw_error.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -13,7 +13,7 @@
 #include <boost/system/system_error.hpp>
 #include <boost/throw_exception.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
    inline void throw_error(const boost::system::error_code& ec)
@@ -27,6 +27,6 @@
    }
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_THROW_ERROR_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/url_decode.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/url_decode.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/url_decode.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -13,7 +13,7 @@
 
 #include <string>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
    /// Convert a char into a hexadecimal value
@@ -30,7 +30,7 @@
    BOOST_CGI_INLINE std::string url_decode( const std::string& str );
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #if !defined( BOOST_CGI_BUILD_LIB )
 # include "boost/cgi/detail/url_decode.ipp"

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/url_decode.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/url_decode.ipp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/detail/url_decode.ipp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,7 +11,7 @@
 
 #include "boost/cgi/detail/url_decode.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace detail {
 
    /// Convert a char into a hexadecimal value
@@ -100,7 +100,7 @@
    }
 
  } // namespace detail
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/error.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/error.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/error.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -24,11 +24,13 @@
 #include "boost/cgi/common/error.hpp"
 #include "boost/cgi/fcgi/error.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
   namespace error {
 
+ using namespace ::BOOST_CGI_NAMESPACE::common::error;
+
   } // namespace error
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_ERROR_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -10,6 +10,7 @@
 #define CGI_FCGI_HPP_INCLUDED__
 
 // #include all fcgi-related files only
+#include "boost/cgi/config.hpp"
 #include "boost/cgi/fcgi/service.hpp"
 #include "boost/cgi/fcgi/acceptor.hpp"
 #include "boost/cgi/fcgi/client.hpp"
@@ -18,18 +19,18 @@
 //#include "boost/cgi/fcgi/request_acceptor_service.hpp"
 #include "boost/cgi/detail/common_headers.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace fcgi {
- //using namespace ::cgi; // **FIXME** this must go.
- using namespace ::cgi::common; // import common elements.
+ using namespace ::BOOST_CGI_NAMESPACE::common; // import common elements.
  } // namespace fcgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 /// Dump fcgi stuff into the boost namespace
 namespace boost {
  namespace fcgi {
- using namespace ::cgi::fcgi;
- } // namespace acgi
+ using namespace ::BOOST_CGI_NAMESPACE::fcgi;
+ using namespace ::BOOST_CGI_NAMESPACE::common; // import common elements.
+ } // namespace fcgi
 } // namespace boost
 
 #endif // CGI_FCGI_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/acceptor.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/acceptor.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/acceptor.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,17 +12,21 @@
 #include "boost/cgi/basic_request_acceptor.hpp"
 #include "boost/cgi/fcgi/request_acceptor_service.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace fcgi {
 
    /// Typedef for common usage (FCGI)
    typedef
- ::cgi::common::basic_request_acceptor<
+ ::BOOST_CGI_NAMESPACE::common::basic_request_acceptor<
            fcgi_request_acceptor_service<>
>
    acceptor;
 
  } // namespace fcgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
+
+namespace boost { namespace fcgi {
+ using ::BOOST_CGI_NAMESPACE::fcgi::acceptor;
+} }
 
 #endif // CGI_FCGI_ACCEPTOR_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/acceptor_service_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/acceptor_service_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/acceptor_service_impl.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -28,7 +28,7 @@
 #include "boost/cgi/detail/protocol_traits.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
    namespace detail {
 
@@ -74,9 +74,9 @@
     * which takes a ProtocolService (**LINK**). If the protocol isn't async then
     * the class can be used without a ProtocolService.
     */
- template<typename Protocol_ = ::cgi::common::fcgi_>
+ template<typename Protocol_ = ::BOOST_CGI_NAMESPACE::common::fcgi_>
    class acceptor_service_impl
- : public detail::service_base< ::cgi::fcgi::acceptor_service_impl<Protocol_> >
+ : public detail::service_base< ::BOOST_CGI_NAMESPACE::fcgi::acceptor_service_impl<Protocol_> >
    {
    public:
 
@@ -127,8 +127,8 @@
        type::implementation_type::endpoint_type endpoint_type;
 
 
- explicit acceptor_service_impl(::cgi::common::io_service& ios)
- : detail::service_base< ::cgi::fcgi::acceptor_service_impl<Protocol_> >(ios)
+ explicit acceptor_service_impl(::BOOST_CGI_NAMESPACE::common::io_service& ios)
+ : detail::service_base< ::BOOST_CGI_NAMESPACE::fcgi::acceptor_service_impl<Protocol_> >(ios)
        , acceptor_service_(boost::asio::use_service<acceptor_service_type>(ios))
        //, endpoint(boost::asio::ip::tcp::v4())
      {
@@ -234,7 +234,7 @@
             assignment. There are a couple of ways around this; the one that
             seems sensible is to keep the basic_request<>s noncopyable, but
             allow the actual data be copied. At the moment the actual data is
- held in a vector<string> headers container and a cgi::streambuf.
+ held in a vector<string> headers container and a BOOST_CGI_NAMESPACE::streambuf.
             These two bits should really be factored out into a message type.
             IOW, the message type will be copyable (but should probably have
             unique-ownership semantics).
@@ -353,7 +353,7 @@
    };
 
  } // namespace fcgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/client.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/client.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/client.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -32,7 +32,7 @@
 #undef max
 #include <algorithm>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   enum client_status
@@ -51,11 +51,11 @@
   class basic_client<connections::shareable_tcp, Protocol>
   {
   public:
- typedef ::cgi::common::io_service io_service_type;
- typedef ::cgi::common::map map_type;
- typedef Protocol protocol_type;
- typedef connections::shareable_tcp connection_type;
- typedef typename connection_type::pointer connection_ptr;
+ typedef ::BOOST_CGI_NAMESPACE::common::io_service io_service_type;
+ typedef ::BOOST_CGI_NAMESPACE::common::map map_type;
+ typedef Protocol protocol_type;
+ typedef connections::shareable_tcp connection_type;
+ typedef typename connection_type::pointer connection_ptr;
     typedef boost::array<
         unsigned char
       , fcgi::spec::header_length::value
@@ -130,7 +130,7 @@
       if (!ec && status_ != closed_ && connection_->is_open())
       {
         outbuf_.clear();
- header_.reset(spec_detail::END_REQUEST, request_id_, 8);
+ header_.reset(fcgi::spec_detail::END_REQUEST, request_id_, 8);
 
         // Write an EndRequest packet to the server.
         fcgi::spec::end_request_body body(
@@ -225,20 +225,20 @@
           outbuf_.push_back(*iter);
         }
       }
- header_.reset(spec_detail::STDOUT, request_id_, total_buffer_size);
+ header_.reset(fcgi::spec_detail::STDOUT, request_id_, total_buffer_size);
       
       std::size_t bytes_transferred
         = boost::asio::write(*connection_, outbuf_
                             , boost::asio::transfer_all(), ec);
 
- /*
+
       std::cerr<< "Transferred " << bytes_transferred
                << " / " << total_buffer_size << " bytes (running total: "
- << total_sent_bytes_ << "; "
+ << total_sent_bytes_ << " bytes; "
                << total_sent_packets_ << " packets).\n";
       if (ec)
         std::cerr<< "Error " << ec << ": " << ec.message() << '\n';
- */
+
       total_sent_bytes_ += bytes_transferred;
       total_sent_packets_ += 1;
       // Now remove the protocol overhead from the caller, who
@@ -246,7 +246,7 @@
       bytes_transferred -= fcgi::spec::header_length::value;
       // Check everything was written ok.
       if (!ec && bytes_transferred != total_buffer_size)
- ec = ::cgi::error::couldnt_write_complete_packet;
+ ec = ::BOOST_CGI_NAMESPACE::fcgi::error::couldnt_write_complete_packet;
 
       return bytes_transferred;
     }
@@ -341,14 +341,12 @@
 namespace fcgi {
     typedef
       common::basic_client<
- connections::shareable_tcp, ::cgi::common::fcgi_
+ connections::shareable_tcp, ::BOOST_CGI_NAMESPACE::common::fcgi_
>
     client;
 } // namespace fcgi
 
-
-
-}// namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_FCGI_CLIENT_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/error.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/error.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/error.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -17,7 +17,8 @@
 #include <string>
 #include <boost/system/error_code.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
+ namespace fcgi {
   namespace error {
 
 enum fcgi_errors
@@ -116,15 +117,18 @@
 }
 
 static const boost::system::error_category& fcgi_category
- = ::cgi::error::get_fcgi_category();
+ = ::BOOST_CGI_NAMESPACE::fcgi::error::get_fcgi_category();
 
   } // namespace error
-} // namespace cgi
+ } // namespace fcgi
+BOOST_CGI_NAMESPACE_END
 
 namespace boost {
   namespace system {
 
- template<> struct is_error_code_enum< ::cgi::error::fcgi_errors>
+ template<> struct is_error_code_enum<
+ ::BOOST_CGI_NAMESPACE::fcgi::error::fcgi_errors
+ >
     {
       BOOST_STATIC_CONSTANT(bool, value = true);
     };
@@ -132,7 +136,8 @@
   } // namespace system
 } // namespace boost
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
+ namespace fcgi {
   namespace error {
   
     inline boost::system::error_code make_error_code(fcgi_errors e)
@@ -142,6 +147,7 @@
     }
 
   } // namespace error
-} // namespace cgi
+ } // namespace fcgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_FCGI_ERROR_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -14,7 +14,7 @@
 #include "boost/cgi/fcgi/request_service.hpp"
 #include "boost/cgi/fwd/basic_request_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace fcgi {
    
    // typedef for typical usage (FCGI)
@@ -25,7 +25,11 @@
    request;
 
  } // namespace fcgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
+
+namespace boost { namespace fcgi {
+ using ::BOOST_CGI_NAMESPACE::fcgi::request;
+} }
 
 #include "boost/cgi/basic_request.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_acceptor_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_acceptor_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_acceptor_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -19,7 +19,7 @@
 #include "boost/cgi/fcgi/acceptor_service_impl.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   /// The service class for FCGI basic_request_acceptor<>s
   /**
@@ -178,7 +178,7 @@
     service_impl_type service_impl_;
   };
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_fwd.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,7 +11,7 @@
 
 #include "boost/cgi/basic_request_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
   namespace fcgi {
 
     typedef service service_t;
@@ -20,7 +20,7 @@
     typedef basic_request<fcgi_request_service, service_t> request;
 
   } // namespace fcgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_FCGI_REQUEST_FWD_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/request_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -27,7 +27,7 @@
 #include "boost/cgi/detail/service_base.hpp"
 #include "boost/cgi/common/parse_options.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace fcgi {
  
   /// The IoObjectService class for a FCGI basic_request<>s
@@ -40,11 +40,11 @@
     struct implementation_type
       : common::request_base<fcgi_request_service>::impl_base
     {
- typedef ::cgi::common::fcgi_ protocol_type;
- typedef ::cgi::fcgi::client client_type;
- typedef client_type::connection_type connection_type;
- typedef client_type::header_buffer_type header_buffer_type;
- typedef spec_detail::Header header_type;
+ typedef ::BOOST_CGI_NAMESPACE::common::fcgi_ protocol_type;
+ typedef ::BOOST_CGI_NAMESPACE::fcgi::client client_type;
+ typedef client_type::connection_type connection_type;
+ typedef client_type::header_buffer_type header_buffer_type;
+ typedef spec_detail::Header header_type;
 
       typedef detail::protocol_traits<
         protocol_type
@@ -57,7 +57,7 @@
         : id_(0)
         , client_()
         , stdin_parsed_(false)
- , http_status_(::cgi::common::http::no_content)
+ , http_status_(::BOOST_CGI_NAMESPACE::common::http::no_content)
         , request_status_(common::unloaded)
         , request_role_(spec_detail::ANY)
         , all_done_(false)
@@ -71,7 +71,7 @@
       client_type client_;
 
       bool stdin_parsed_;
- ::cgi::common::http::status_code http_status_;
+ ::BOOST_CGI_NAMESPACE::common::http::status_code http_status_;
       common::request_status request_status_;
       fcgi::spec_detail::role_types request_role_;
       std::size_t characters_left_;
@@ -121,7 +121,7 @@
       Service* service_;
     };
     
- fcgi_request_service(::cgi::common::io_service& ios)
+ fcgi_request_service(::BOOST_CGI_NAMESPACE::common::io_service& ios)
       : detail::service_base<fcgi_request_service>(ios)
     {
     }
@@ -160,11 +160,11 @@
     }
 
     /// Close the request.
- int close(implementation_type& impl, ::cgi::common::http::status_code& hsc
+ int close(implementation_type& impl, ::BOOST_CGI_NAMESPACE::common::http::status_code& hsc
               , int program_status);
 
     /// Close the request.
- int close(implementation_type& impl, ::cgi::common::http::status_code& hsc
+ int close(implementation_type& impl, ::BOOST_CGI_NAMESPACE::common::http::status_code& hsc
              , int program_status, boost::system::error_code& ec);
 
     /// Clear all request data (object is then safe to remove).
@@ -192,9 +192,9 @@
     /// Returns true if the request environment params have been read.
     bool params_read(implementation_type& impl);
 
- role_type get_role(implementation_type& impl)
+ common::role_type get_role(implementation_type& impl)
     {
- return responder;
+ return common::responder;
     }
 
     implementation_type::client_type&
@@ -275,12 +275,12 @@
 
     // Mammoth typedef corresponding to function signature of process_*
     // functions.
- typedef boost::system::error_code
- ( full_type::* proc_func_t)
- (implementation_type& impl, boost::uint16_t, const unsigned char*
- , boost::uint32_t, boost::system::error_code&);
+ //typedef boost::system::error_code
+ // ( full_type::* proc_func_t)
+ // (implementation_type& impl, boost::uint16_t, const unsigned char*
+ // , boost::uint32_t, boost::system::error_code&);
 
- static const proc_func_t proc_funcs[];
+ //const proc_func_t proc_funcs[8];
   
     boost::system::error_code
       parse_packet(implementation_type& impl, boost::system::error_code& ec);
@@ -300,10 +300,11 @@
       begin_request_helper(implementation_type& impl
                           , implementation_type::header_buffer_type& header
                           , boost::system::error_code& ec);
+
   };
 
  } // namespace fcgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/fcgi/request.hpp"
 #include "boost/cgi/basic_request.hpp"

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,16 +12,21 @@
 #include "boost/cgi/common/tags.hpp"
 #include "boost/cgi/common/basic_protocol_service.hpp"
 
-namespace cgi {
-
- //typedef basic_protocol_service<tags::scgi> scgi_service;
-
+BOOST_CGI_NAMESPACE_BEGIN
  namespace fcgi {
-
- // typedef for standard scgi::service (a model of ProtocolService)
- typedef ::cgi::common::basic_protocol_service< ::cgi::common::fcgi_> service;
-
- }
-} // namespace cgi
+
+ // typedef for standard fcgi::service (a model of ProtocolService)
+ typedef
+ ::BOOST_CGI_NAMESPACE::common::basic_protocol_service<
+ ::BOOST_CGI_NAMESPACE::common::fcgi_
+ >
+ service;
+
+ } // namespace fcgi
+BOOST_CGI_NAMESPACE_END
+
+namespace boost { namespace fcgi {
+ using ::BOOST_CGI_NAMESPACE::fcgi::service;
+} }
 
 #endif // CGI_FCGI_SERVICE_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/specification.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/specification.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fcgi/specification.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -14,7 +14,7 @@
 // NOTE: CamelCase style mimicks the FastCGI specification
 // SEE: http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S8
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace fcgi {
   namespace spec_detail {
 
@@ -577,12 +577,12 @@
         }
       }
     };
- //using namespace ::cgi::fcgi::detail;
+ //using namespace ::BOOST_CGI_NAMESPACE::fcgi::detail;
   }
 
   namespace spec = specification;
 
  } // namespace fcgi
-}// namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_FCGI_SPECIFICATION_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_connection_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_connection_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_connection_fwd.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,13 +9,13 @@
 #ifndef CGI_BASIC_CONNECTION_FWD_HPP_INCLUDED__
 #define CGI_BASIC_CONNECTION_FWD_HPP_INCLUDED__
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   template<typename ConnectionType>
   class basic_connection;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_BASIC_CONNECTION_FWD_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_protocol_service_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_protocol_service_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_protocol_service_fwd.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -15,7 +15,7 @@
 
 #include "boost/cgi/fwd/io_service_provider_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   template<
@@ -25,7 +25,7 @@
   class basic_protocol_service;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_BASIC_PROTOCOL_SERVICE_FWD_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_request_acceptor_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_request_acceptor_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_request_acceptor_fwd.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,11 +9,11 @@
 #ifndef CGI_BASIC_ACCEPTOR_FWD_HPP_INCLUDED__
 #define CGI_BASIC_ACCEPTOR_FWD_HPP_INCLUDED__
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   template<typename>
   class basic_acceptor;
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_BASIC_ACCEPTOR_FWD_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_request_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_request_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/basic_request_fwd.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,7 +12,7 @@
 #include "boost/cgi/fwd/request_service_fwd.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   template<typename RequestService
@@ -21,7 +21,7 @@
   class basic_request;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_BASIC_REQUEST_FWD_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/io_service_provider_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/io_service_provider_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/io_service_provider_fwd.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -15,14 +15,14 @@
 
 #include "boost/cgi/common/tags.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    template<typename = tags::single_service>
    class io_service_provider;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_IO_SERVICE_PROVIDER_FWD_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/request_service_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/request_service_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/fwd/request_service_fwd.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -10,7 +10,7 @@
 #define CGI_REQUEST_SERVICE_FWD_HPP_INCLUDED
 
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
   /// The generic service class for basic_request<>s
   /**
@@ -23,6 +23,6 @@
   template<typename Protocol>
   class request_service;
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_REQUEST_SERVICE_FWD_HPP_INCLUDED

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/http/status_code.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/http/status_code.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/http/status_code.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,7 +9,7 @@
 #ifndef CGI_HTTP_STATUS_CODE_HPP_INCLUDED__
 #define CGI_HTTP_STATUS_CODE_HPP_INCLUDED__
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
   namespace http {
 
@@ -86,7 +86,7 @@
 
   using namespace common::http; // **FIXME**
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_HTTP_STATUS_CODE_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/basic_request.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/basic_request.ipp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/basic_request.ipp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -38,8 +38,10 @@
 #include "boost/cgi/import/basic_io_object.hpp"
 #include "boost/cgi/detail/basic_sync_io_object.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/config.hpp"
+
+BOOST_CGI_NAMESPACE_BEGIN
 
-namespace cgi {
  namespace common {
 
   /// The basic_request class, primary entry point to the library
@@ -58,57 +60,6 @@
    * protected request object).
   **/
 
- // Throws
- template<typename RequestService, typename ProtocolService, typename Acceptor>
- basic_request<RequestService,ProtocolService,Acceptor>::basic_request
- (
- bool load_now = true, bool parse_post = true
- )
- : detail::basic_sync_io_object<service_type>()
- {
- if (load_now) load(parse_post);
- }
-
- // Won't throw
- template<typename RequestService, typename ProtocolService, typename Acceptor>
- basic_request<RequestService,ProtocolService,Acceptor>::basic_request
- (
- boost::system::error_code& ec
- , const bool load_now = true
- , const bool parse_post = true
- )
- : detail::basic_sync_io_object<service_type>()
- {
- if (load_now) load(ec, parse_post);
- }
-
- // Throws
- template<typename RequestService, typename ProtocolService, typename Acceptor>
- basic_request<RequestService,ProtocolService,Acceptor>::basic_request
- (
- protocol_service_type& s, const bool load_now = false
- , const bool parse_post = false
- )
- : basic_io_object<service_type>(s.io_service())
- {
- set_protocol_service(s);
- if (load_now) load(parse_post);
- }
-
- // Won't throw
- template<typename RequestService, typename ProtocolService, typename Acceptor>
- basic_request<RequestService,ProtocolService,Acceptor>::basic_request
- (
- protocol_service_type& s
- , boost::system::error_code& ec
- , const bool load_now = false, const bool parse_post = false
- )
- : basic_io_object<service_type>(s.io_service())
- {
- set_protocol_service(s);
- if(load_now) load(ec, parse_post);//this->service.load(this->implementation, false, ec);
- }
-
     /// Make a new mutiplexed request from an existing connection.
     // Throws.
   template<typename RequestService, typename ProtocolService, typename Acceptor>
@@ -308,7 +259,7 @@
      * Set the output sink as `stdout_`, `stderr_`, or `stdout_ | stderr_`
      */
     /*
- void set_output(cgi::sink dest, boost::system::error_code& ec)
+ void set_output(BOOST_CGI_NAMESPACE::sink dest, boost::system::error_code& ec)
     {
       this->service(this->implementation, dest, ec);
     }
@@ -489,7 +440,8 @@
   };
 
  } // namespace common
-} // namespace cgi
+
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/fcgi_request_service.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/fcgi_request_service.ipp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/fcgi_request_service.ipp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -28,8 +28,9 @@
 #include "boost/cgi/import/io_service.hpp"
 #include "boost/cgi/detail/service_base.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
+#include "boost/cgi/config.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
 
    namespace detail {
      
@@ -71,7 +72,7 @@
     /// Close the request.
     BOOST_CGI_INLINE int
     fcgi_request_service::close(
- implementation_type& impl, ::cgi::common::http::status_code& hsc
+ implementation_type& impl, ::BOOST_CGI_NAMESPACE::common::http::status_code& hsc
       , int program_status)
     {
       impl.all_done_ = true;
@@ -82,7 +83,7 @@
 
     BOOST_CGI_INLINE int
     fcgi_request_service::close(
- implementation_type& impl, ::cgi::common::http::status_code& hsc
+ implementation_type& impl, ::BOOST_CGI_NAMESPACE::common::http::status_code& hsc
       , int program_status, boost::system::error_code& ec)
     {
       impl.all_done_ = true;
@@ -196,7 +197,7 @@
       if (request_method == "POST"
           && opts & common::parse_post_only)
       {
- std::cerr<< "Parsing post vars now.\n";
+ std::cerr<< "Parsing post vars now.\n";
         if (parse_post_vars(impl, ec))
               return ec;
       }
@@ -212,6 +213,7 @@
           parse_packet(impl, ec);
         }
       }
+
       if (ec == error::eof) {
         ec = boost::system::error_code();
         return ec;
@@ -598,11 +600,27 @@
         implementation_type& impl, const MutableBuffersType& buf
       , boost::system::error_code& ec)
     {
- return
- (this->* proc_funcs[fcgi::spec::get_type(impl.header_buf_)])
- (impl, fcgi::spec::get_request_id(impl.header_buf_)
- , boost::asio::buffer_cast<unsigned char*>(buf)
- , boost::asio::buffer_size(buf), ec);
+ switch(fcgi::spec::get_type(impl.header_buf_))
+ {
+ case 1: process_begin_request(impl, fcgi::spec::get_request_id(impl.header_buf_)
+ , boost::asio::buffer_cast<unsigned char*>(buf)
+ , boost::asio::buffer_size(buf), ec);
+ break;
+ case 2: process_abort_request(impl, fcgi::spec::get_request_id(impl.header_buf_)
+ , boost::asio::buffer_cast<unsigned char*>(buf)
+ , boost::asio::buffer_size(buf), ec);
+ break;
+ case 4: process_params(impl, fcgi::spec::get_request_id(impl.header_buf_)
+ , boost::asio::buffer_cast<unsigned char*>(buf)
+ , boost::asio::buffer_size(buf), ec);
+ break;
+ case 5: process_stdin(impl, fcgi::spec::get_request_id(impl.header_buf_)
+ , boost::asio::buffer_cast<unsigned char*>(buf)
+ , boost::asio::buffer_size(buf), ec);
+ break;
+ default: break;
+ }
+ return ec;
     }
 
     BOOST_CGI_INLINE boost::system::error_code
@@ -632,25 +650,13 @@
        return ec;
     }
 
- //template<>
- const fcgi_request_service::proc_func_t fcgi_request_service::proc_funcs[] =
- { 0
- , &fcgi_request_service::process_begin_request
- , &fcgi_request_service::process_abort_request
- , 0
- , &fcgi_request_service::process_params
- , &fcgi_request_service::process_stdin
- , 0
- , 0
- };
-
  } // namespace fcgi
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #include "boost/cgi/fcgi/request.hpp"
 #include "boost/cgi/basic_request.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace fcgi {
 
 /*
@@ -696,9 +702,9 @@
 
         // **FIXME** THIS LEAKS MEMORY!!!!!!!
         //requests.at(id-1)
- request_type* new_request = new request_type(impl, ec);
+ //request_type* new_request = new request_type(impl, ec);
 
- conn.add_request(id, new_request, true, ec);
+ //conn.add_request(id, new_request, true, ec);
 
         return ec;//error::multiplexed_request_incoming;
       }
@@ -708,7 +714,8 @@
 
 
  } // namespace fcgi
-} // namespace cgi
+
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_FCGI_REQUEST_SERVICE_IPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/form_parser.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/form_parser.ipp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/form_parser.ipp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -14,6 +14,7 @@
 #include "boost/cgi/common/form_part.hpp"
 #include "boost/cgi/detail/url_decode.hpp"
 #include "boost/cgi/common/source_enums.hpp"
+#include "boost/cgi/config.hpp"
 
 #include <iostream> // **FIXME**
 #include <fstream>
@@ -21,7 +22,8 @@
 #include <boost/algorithm/string/trim.hpp>
 #include <boost/random/mersenne_twister.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
+
  namespace detail {
 
     BOOST_CGI_INLINE
@@ -42,7 +44,7 @@
          "multipart/form-data") != string_type::npos)
         parse_multipart_form(ec);
       else
- return ec = error::invalid_form_type;
+ return ec = common::error::invalid_form_type;
 
       return ec;
     }
@@ -258,7 +260,8 @@
     }
 
  } // namespace detail
-} // namespace cgi
+
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_DETAIL_FORM_PARSER_IPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/response.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/response.ipp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/impl/response.ipp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -28,10 +28,11 @@
 #include "boost/cgi/import/streambuf.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
 #include "boost/cgi/fwd/basic_request_fwd.hpp"
+#include "boost/cgi/config.hpp"
 
-/// This mess outputs a default Content-type header if the user hasn't set any.
-/** **FIXME** Not implemented; not sure if it should be...
- * BOOST_CGI_ADD_DEFAULT_HEADER should not persiste beyond this file.
+/// A macro to output an implicit Content-type.
+/**
+ * `BOOST_CGI_ADD_DEFAULT_HEADER` should not persiste beyond this file.
  *
  * It basically works like (default first):
  *
@@ -59,18 +60,19 @@
 //}
 # define BOOST_CGI_ADD_DEFAULT_HEADER \
       if (headers_.empty()) \
- headers_.push_back("Content-type: "BOOST_CGI_DEFAULT_CONTENT_TYPE" ; Charset: " + charset_ + "\r\n")
+ headers_.push_back("Content-type: "BOOST_CGI_DEFAULT_CONTENT_TYPE"\r\n")
 #endif // defined(BOOST_CGI_NO_DEFAULT_CONTENT_TYPE)
 
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
+
  namespace common {
 
   template<typename T> BOOST_CGI_INLINE
   basic_response<T>::basic_response(http::status_code sc)
     : buffer_(new common::streambuf())
 #if defined (BOOST_WINDOWS)
- , ostream_(buffer_.get(), std::ios::out | std::ios::binary)
+ , ostream_(buffer_.get()) //, std::ios::out | std::ios::binary)
 #else
     , ostream_(buffer_.get())
 #endif // defined (BOOST_WINDOWS)
@@ -89,7 +91,7 @@
   template<typename T> BOOST_CGI_INLINE
   basic_response<T>::basic_response(common::streambuf* buf,
       http::status_code sc)
-#if defined (BOOST_WINDOWS)
+#if BOOST_WINDOWS
     : ostream_(buf, std::ios::out | std::ios::binary)
 #else
     : ostream_(buf)
@@ -115,11 +117,17 @@
     headers_terminated_ = false;
   }
 
- /// Return the response to the 'just constructed' state.
+ /// Return the response to the 'just constructed' state.
+ /**
+ * Clears the response headers and body. Resets the response so it can
+ * be safely used again.
+ */
   template<typename T> BOOST_CGI_INLINE
   void basic_response<T>::reset()
   {
     clear();
+ ostream_.flush();
+ buffer_->consume(buffer_->size());
     headers_terminated_ = false;
   }
 
@@ -318,7 +326,8 @@
   typename basic_response<T>::string_type
     basic_response<T>::str() const
   {
- return string_type(boost::asio::buffer_cast<const char_type *>(buffer_->data()));
+ return string_type(boost::asio::buffer_cast<const char_type *>(buffer_->data()),
+ boost::asio::buffer_size(buffer_->data()));
   }
 
 
@@ -406,6 +415,8 @@
   {
     BOOST_CGI_ADD_DEFAULT_HEADER;
     
+ BOOST_ASSERT((headers_[0].length() > 13 && "Content-type header not found"));
+
     headers_[0].insert(headers_[0].length()-2, "; charset: " + charset_);
 
     // Terminate the headers.
@@ -413,7 +424,6 @@
       headers_.push_back("\r\n");
 
     //{ Construct a ConstBufferSequence out of the headers we have.
- //std::vector<boost::asio::const_buffer> headers;
     typedef typename std::vector<string_type>::iterator iter;
     for (iter i(headers_.begin()), e(headers_.end()); i != e; ++i)
     {
@@ -422,22 +432,22 @@
     //}
 
     headers_terminated_ = true;
- //return ec;
   }
 
  } // namespace common
-} // namespace cgi
+
+BOOST_CGI_NAMESPACE_END
 
   /// Generic ostream template
   template<typename T, typename U> BOOST_CGI_INLINE
- cgi::common::basic_response<T>&
- operator<< (cgi::common::basic_response<T>& resp, U const& u)
+ BOOST_CGI_NAMESPACE::common::basic_response<T>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<T>& resp, U const& u)
   {
     resp.ostream()<< u;
     return resp;
   }
 
- /// You can stream a cgi::header into a response.
+ /// You can stream a BOOST_CGI_NAMESPACE::header into a response.
   /**
    * This is just a more convenient way of doing:
    *
@@ -453,9 +463,9 @@
    * ]
    */
   template<typename CharT> BOOST_CGI_INLINE
- cgi::common::basic_response<CharT>&
- operator<< (cgi::common::basic_response<CharT>& resp
- , cgi::common::basic_header<CharT> const& hdr)
+ BOOST_CGI_NAMESPACE::common::basic_response<CharT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<CharT>& resp
+ , BOOST_CGI_NAMESPACE::common::basic_header<CharT> const& hdr)
   {
     if (hdr.content.empty()) {
       resp.end_headers();
@@ -469,29 +479,29 @@
   }
 
   template<typename CharT> BOOST_CGI_INLINE
- cgi::common::basic_response<CharT>&
- operator<< (cgi::common::basic_response<CharT>& resp
- , cgi::common::charset_header<CharT> const& hdr)
+ BOOST_CGI_NAMESPACE::common::basic_response<CharT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<CharT>& resp
+ , BOOST_CGI_NAMESPACE::common::charset_header<CharT> const& hdr)
   {
     resp.charset() = hdr.content;
     return resp;
   }
 
- /// You can stream a cgi::cookie into a response.
+ /// You can stream a BOOST_CGI_NAMESPACE::cookie into a response.
   /**
    * This is just a shorthand way of setting a header that will set a
    * client-side cookie.
    *
    * You cannot stream a cookie to a response after the headers have been
    * terminated. In this case, an alternative could be to use the HTML tag:
- * <meta http-equiv="Set-cookie" ...> (see http://tinyurl.com/3bxftv or
- * http://tinyurl.com/33znkj), but this is outside the scope of this
- * library.
+ * <meta http-equiv="Set-cookie" ...> (see \url http://tinyurl.com/3bxftv
+ * or \url http://tinyurl.com/33znkj), but this is outside the scope of
+ * this library.
    */
   template<typename T> BOOST_CGI_INLINE
- cgi::common::basic_response<T>&
- operator<< (cgi::common::basic_response<T>& resp
- , cgi::common::basic_cookie<T> ck)
+ BOOST_CGI_NAMESPACE::common::basic_response<T>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<T>& resp
+ , BOOST_CGI_NAMESPACE::common::basic_cookie<T> ck)
   {
     BOOST_ASSERT(!resp.headers_terminated());
     resp.set_header("Set-cookie", ck.to_string());
@@ -499,9 +509,9 @@
   }
 /*
   template<typename T> BOOST_CGI_INLINE
- cgi::common::basic_response<T>&
- operator<< (cgi::common::basic_response<T>& resp
- , cgi::common::basic_cookie<T> const& ck)
+ BOOST_CGI_NAMESPACE::common::basic_response<T>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<T>& resp
+ , BOOST_CGI_NAMESPACE::common::basic_cookie<T> const& ck)
   {
     BOOST_ASSERT(!resp.headers_terminated());
     resp.set_header("Set-cookie", ck.to_string());
@@ -509,18 +519,18 @@
   }
 */
   template<typename T> BOOST_CGI_INLINE
- cgi::common::basic_response<T>&
- operator<< (cgi::common::basic_response<T>& resp
- , cgi::common::http::status_code status)
+ BOOST_CGI_NAMESPACE::common::basic_response<T>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<T>& resp
+ , BOOST_CGI_NAMESPACE::common::http::status_code status)
   {
     BOOST_ASSERT(!resp.headers_terminated());
     return resp.set_status(status);
   }
 
   template<typename charT> BOOST_CGI_INLINE
- cgi::common::basic_response<charT>&
- operator<< (cgi::common::basic_response<charT>& resp
- , cgi::common::basic_response<charT>& other_resp)
+ BOOST_CGI_NAMESPACE::common::basic_response<charT>&
+ operator<< (BOOST_CGI_NAMESPACE::common::basic_response<charT>& resp
+ , BOOST_CGI_NAMESPACE::common::basic_response<charT>& other_resp)
   {
     BOOST_ASSERT(!resp.headers_terminated());
     for(std::vector<std::string>::iterator iter = other_resp.headers().begin(), end = other_resp.headers().end();

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/basic_io_object.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/basic_io_object.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/basic_io_object.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,13 +11,13 @@
 
 #include <boost/asio/basic_io_object.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    using boost::asio::basic_io_object;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_IMPORT_BASIC_IO_OBJECT_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/buffer.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/buffer.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/buffer.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,7 +11,7 @@
 
 #include <boost/asio/buffer.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   /// Import the Boost.Asio overloads.
@@ -21,6 +21,6 @@
 
   using common::buffer;
 
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/io_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/io_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/io_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -15,13 +15,13 @@
 
 #include <boost/asio/io_service.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   using boost::asio::io_service;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_COMMON_IO_SERVICE_HPP_INCLUDED__
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/read.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/read.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/read.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,14 +11,14 @@
 
 #include <boost/asio/read.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   using boost::asio::read;
   using boost::asio::async_read;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_READ_HPP_INCLUDED
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/streambuf.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/streambuf.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/streambuf.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,12 +11,12 @@
 
 #include <boost/asio/streambuf.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   using boost::asio::streambuf;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_STREAMBUF_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/write.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/write.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/import/write.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -11,13 +11,13 @@
 
 #include <boost/asio/write.hpp>
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
   using boost::asio::write;
   using boost::asio::async_write;
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_WRITE_HPP_INCLUDED

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -29,11 +29,11 @@
 */
 
 /// Dump acgi stuff into the boost namespace
-namespace boost {
- namespace scgi {
+BOOST_CGI_NAMESPACE_BEGIN
+ namespace acgi {
    using namespace ::cgi::scgi;
    using namespace ::cgi::common;
  } // namespace acgi
-} // namespace boost
+BOOST_CGI_NAMESPACE_END
 
 #endif // CGI_SCGI_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/acceptor.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/acceptor.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/acceptor.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,13 +12,13 @@
 #include "boost/cgi/basic_request_acceptor.hpp"
 #include "boost/cgi/scgi/request_acceptor_service.hpp"
 
-namespace cgi {
+namespace BOOST_CGI_NAMESPACE {
  namespace scgi {
 
    /// Typedef for common usage (SCGI)
    typedef basic_request_acceptor<scgi_request_acceptor_service<> > acceptor;
 
  } // namespace scgi
-} // namespace cgi
+} // namespace BOOST_CGI_NAMESPACE
 
 #endif // CGI_SCGI_ACCEPTOR_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/acceptor_service_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/acceptor_service_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/acceptor_service_impl.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -28,7 +28,7 @@
 //#include "service_selector.hpp"
 #include "boost/cgi/scgi/request.hpp"
 
-namespace cgi {
+namespace BOOST_CGI_NAMESPACE {
  namespace scgi {
   
    /// The service_impl class for SCGI basic_request_acceptor<>s
@@ -45,7 +45,7 @@
     * which takes a ProtocolService (**LINK**). If the protocol isn't async then
     * the class can be used without a ProtocolService.
     */
- template<typename Protocol_ = ::cgi::scgi_>
+ template<typename Protocol_ = ::BOOST_CGI_NAMESPACE::scgi_>
    class acceptor_service_impl
      : public detail::service_base<acceptor_service_impl<Protocol_> >
    {
@@ -93,7 +93,7 @@
        acceptor_service_type::native_type native_type;
  
 
- explicit acceptor_service_impl(::cgi::io_service& ios)
+ explicit acceptor_service_impl(::BOOST_CGI_NAMESPACE::io_service& ios)
        : detail::service_base<acceptor_service_impl<Protocol_> >(ios)
        , acceptor_service_(boost::asio::use_service<acceptor_service_type>(ios))
        //, endpoint(boost::asio::ip::tcp::v4())
@@ -182,7 +182,7 @@
             assignment. There are a couple of ways around this; the one that
             seems sensible is to keep the basic_request<>s noncopyable, but
             allow the actual data be copied. At the moment the actual data is
- held in a vector<string> headers container and a cgi::streambuf.
+ held in a vector<string> headers container and a BOOST_CGI_NAMESPACE::streambuf.
             These two bits should really be factored out into a message type.
             IOW, the message type will be copyable (but should probably have
             unique-ownership semantics).
@@ -212,7 +212,7 @@
             assignment. There are a couple of ways around this; the one that
             seems sensible is to keep the basic_request<>s noncopyable, but
             allow the actual data be copied. At the moment the actual data is
- held in a vector<string> headers container and a cgi::streambuf.
+ held in a vector<string> headers container and a BOOST_CGI_NAMESPACE::streambuf.
             These two bits should really be factored out into a message type.
             IOW, the message type will be copyable (but should probably have
             unique-ownership semantics).
@@ -281,7 +281,7 @@
    };
  
  } // namespace scgi
-} // namespace cgi
+} // namespace BOOST_CGI_NAMESPACE
  
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -14,7 +14,7 @@
 //#include "boost/cgi/request_service_fwd.hpp"
 #include "boost/cgi/scgi/request_service.hpp"
 #include "boost/cgi/scgi/service.hpp"
-namespace cgi {
+namespace BOOST_CGI_NAMESPACE {
 
   //class scgi::scgi_request_service;
 
@@ -25,7 +25,7 @@
    // typedef for typical usage (SCGI)
    typedef basic_request<scgi_request_service, service> request;
  } // namespace scgi
-} // namespace cgi
+} // namespace BOOST_CGI_NAMESPACE
 
 //#include "boost/cgi/request_service.hpp"
 #include "boost/cgi/basic_request.hpp"

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_acceptor_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_acceptor_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_acceptor_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -21,7 +21,7 @@
 //#include "service_selector.hpp"
 #include "boost/cgi/scgi/acceptor_service_impl.hpp"
 
-namespace cgi {
+namespace BOOST_CGI_NAMESPACE {
 
   /// The service class for SCGI basic_request_acceptor<>s
   /**
@@ -48,7 +48,7 @@
     /// The unique service identifier
     //static boost::asio::io_service::id id;
 
- scgi_request_acceptor_service(::cgi::io_service& ios)
+ scgi_request_acceptor_service(::BOOST_CGI_NAMESPACE::io_service& ios)
       : detail::service_base<scgi_request_acceptor_service<protocol_type> >(ios)
       , service_impl_(ios)
     {
@@ -155,7 +155,7 @@
     service_impl_type service_impl_;
   };
 
-} // namespace cgi
+} // namespace BOOST_CGI_NAMESPACE
 
 #include "boost/cgi/detail/pop_options.hpp"
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_impl.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -21,12 +21,12 @@
  *
  * THIS FILE IS OBSOLETE.
  *
- * SEE request_service.hpp:cgi::scgi::scgi_request_service::implementation_type
+ * SEE request_service.hpp:BOOST_CGI_NAMESPACE::scgi::scgi_request_service::implementation_type
  * INSTEAD.
  *
 **************/
 
-namespace cgi {
+namespace BOOST_CGI_NAMESPACE {
  namespace scgi {
 
   
@@ -34,10 +34,12 @@
   class scgi_request_impl
   {
   public:
- typedef cgi::map map_type;
- typedef tcp_connection connection_type;
- typedef connection_type::pointer connection_ptr;
- typedef ::cgi::basic_client<connection_type> client_type;
+ typedef BOOST_CGI_NAMESPACE::map map_type;
+ typedef tcp_connection connection_type;
+ typedef connection_type::pointer connection_ptr;
+ typedef ::BOOST_CGI_NAMESPACE::basic_client<
+ connection_type
+ > client_type;
 
     scgi_request_impl()
       : stdin_parsed_(false)
@@ -75,6 +77,6 @@
   };
 
  } // namespace scgi
-} // namespace cgi
+} // namespace BOOST_CGI_NAMESPACE
 
 #endif // CGI_SCGI_REQUEST_IMPL_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/request_service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -23,7 +23,7 @@
 #include "boost/cgi/detail/service_base.hpp"
 #include "boost/cgi/detail/extract_params.hpp"
 
-namespace cgi {
+namespace BOOST_CGI_NAMESPACE {
  namespace scgi {
 
   /// The IoObjectService class for a SCGI basic_request<>s
@@ -34,9 +34,9 @@
     /// The actual implementation date for an SCGI request.
     struct implementation_type
     {
- typedef ::cgi::map map_type;
+ typedef ::BOOST_CGI_NAMESPACE::map map_type;
       typedef tcp_connection connection_type;
- typedef ::cgi::scgi_ protocol_type;
+ typedef ::BOOST_CGI_NAMESPACE::scgi_ protocol_type;
       typedef basic_client<
         connection_type, protocol_type
> client_type;
@@ -69,7 +69,7 @@
     typedef type::implementation_type::protocol_type protocol_type;
     typedef type::implementation_type::map_type map_type;
 
- scgi_request_service(::cgi::io_service& ios)
+ scgi_request_service(::BOOST_CGI_NAMESPACE::io_service& ios)
       : detail::service_base<scgi_request_service>(ios)
     {
     }
@@ -121,7 +121,7 @@
 
       std::vector<char> buf;
       // read the header content
- //::cgi::read(impl.client_, buffer(buf, header_len), ec);
+ //::BOOST_CGI_NAMESPACE::read(impl.client_, buffer(buf, header_len), ec);
 /*
       const std::string& request_method = env(impl, "REQUEST_METHOD", ec);
       if (request_method == "GET")
@@ -311,10 +311,10 @@
     }
 
   private:
- //cgi::io_service& io_service_;
+ //BOOST_CGI_NAMESPACE::io_service& io_service_;
   };
 
  } // namespace scgi
-} // namespace cgi
+} // namespace BOOST_CGI_NAMESPACE
 
 #endif // CGI_SCGI_REQUEST_SERVICE_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/service.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/service.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,16 +12,16 @@
 #include "boost/cgi/tags.hpp"
 #include "boost/cgi/basic_protocol_service.hpp"
 
-namespace cgi {
+namespace BOOST_CGI_NAMESPACE {
 
   //typedef basic_protocol_service<tags::scgi> scgi_service;
 
  namespace scgi {
 
    // typedef for standard scgi::service (a model of ProtocolService)
- typedef basic_protocol_service< ::cgi::scgi_> service;
+ typedef basic_protocol_service< ::BOOST_CGI_NAMESPACE::scgi_> service;
 
  }
-} // namespace cgi
+} // namespace BOOST_CGI_NAMESPACE
 
 #endif // CGI_SCGI_SERVICE_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/service_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/service_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/scgi/service_impl.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -20,17 +20,17 @@
 #include "../detail/service_base.hpp"
 #include "../detail/extract_params.hpp"
 
-namespace cgi {
+namespace BOOST_CGI_NAMESPACE {
 
   class scgi_request_service_impl
     : public detail::service_base<scgi_service_impl>
   {
   public:
- typedef tags::scgi protocol_type;
- typedef scgi_request_impl implementation_type;
- typedef cgi::map map_type;
+ typedef tags::scgi protocol_type;
+ typedef scgi_request_impl implementation_type;
+ typedef BOOST_CGI_NAMESPACE::map map_type;
 
- scgi_request_service_impl(cgi::io_service& ios)
+ scgi_request_service_impl(BOOST_CGI_NAMESPACE::io_service& ios)
       : detail::service_base<scgi_request_service_impl>(ios)
       , io_service_(ios)
     {
@@ -234,9 +234,9 @@
     }
 
   private:
- cgi::io_service& io_service_;
+ BOOST_CGI_NAMESPACE::io_service& io_service_;
   };
 
-} // namespace cgi
+} // namespace BOOST_CGI_NAMESPACE
 
 #endif // CGI_SCGI_SERVICE_IMPL_HPP_INCLUDED__

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/get.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/get.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/get.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -2,12 +2,14 @@
 #ifndef BOOST_CGI_GET_HPP_INCLUDED_
 #define BOOST_CGI_GET_HPP_INCLUDED_
 
+#include "boost/cgi/detail/push_options.hpp"
+
 #include <map>
 ///////////////////////////////////////////////////////////
 #include "boost/cgi/common/name.hpp"
 #include "boost/cgi/utility/has_key.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    /// Get a value from the map, or return the passed value as a default.
@@ -23,7 +25,7 @@
     }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_GET_HPP_INCLUDED_
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/get_value.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/get_value.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/get_value.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -2,6 +2,8 @@
 #ifndef BOOST_CGI_REDIRECT_HPP_INCLUDED_
 #define BOOST_CGI_REDIRECT_HPP_INCLUDED_
 
+#include "boost/cgi/detail/push_options.hpp"
+
 #include <string>
 ///////////////////////////////////////////////////////////
 #include <boost/system/error_code.hpp>
@@ -10,7 +12,7 @@
 #include "boost/cgi/common/header.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    /// Redirect a request to another place.
@@ -43,7 +45,7 @@
    }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_REDIRECT_HPP_INCLUDED_
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/has_key.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/has_key.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/has_key.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -2,11 +2,13 @@
 #ifndef BOOST_CGI_HAS_KEY_HPP_INCLUDED_
 #define BOOST_CGI_HAS_KEY_HPP_INCLUDED_
 
+#include "boost/cgi/detail/push_options.hpp"
+
 #include <map>
 ///////////////////////////////////////////////////////////
 #include "boost/cgi/common/name.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    /// Check if the given map has an entry `name`.
@@ -53,7 +55,7 @@
     }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_HAS_KEY_HPP_INCLUDED_
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/redirect.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/redirect.hpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/boost/cgi/utility/redirect.hpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -2,6 +2,8 @@
 #ifndef BOOST_CGI_REDIRECT_HPP_INCLUDED_
 #define BOOST_CGI_REDIRECT_HPP_INCLUDED_
 
+#include "boost/cgi/detail/push_options.hpp"
+
 #include <string>
 ///////////////////////////////////////////////////////////
 #include <boost/system/error_code.hpp>
@@ -10,7 +12,7 @@
 #include "boost/cgi/common/header.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
 
-namespace cgi {
+BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
 
    /// Redirect a request to another place.
@@ -47,7 +49,7 @@
    }
 
  } // namespace common
-} // namespace cgi
+BOOST_CGI_NAMESPACE_END
 
 #endif // BOOST_CGI_REDIRECT_HPP_INCLUDED_
 

Deleted: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.ncb
==============================================================================
Binary file. No diff available.

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.sln
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.sln (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.sln 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -35,6 +35,8 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cgi_file_browser_debug", "cgi_file_browser_debug\cgi_file_browser_debug.vcproj", "{E266C18C-F482-459C-9805-EBAF5C68E50A}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcgi_speed_check", "fcgi_speed_check\fcgi_speed_check.vcproj", "{8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}"
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -108,6 +110,10 @@
                 {E266C18C-F482-459C-9805-EBAF5C68E50A}.Debug|Win32.Build.0 = Debug|Win32
                 {E266C18C-F482-459C-9805-EBAF5C68E50A}.Release|Win32.ActiveCfg = Release|Win32
                 {E266C18C-F482-459C-9805-EBAF5C68E50A}.Release|Win32.Build.0 = Release|Win32
+ {8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}.Debug|Win32.Build.0 = Debug|Win32
+ {8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}.Release|Win32.ActiveCfg = Release|Win32
+ {8F7D1DD8-FE44-419B-BE93-6A78C708ACDA}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/Boost.CGI.suo
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_cookie_game/acgi_cookie_game.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_cookie_game/acgi_cookie_game.vcproj (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_cookie_game/acgi_cookie_game.vcproj 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -174,28 +174,10 @@
         <References>
         </References>
         <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ <File
+ RelativePath="..\..\..\..\..\example\acgi\cookie_game\main.cpp"
>
- <File
- RelativePath="..\..\..\..\..\example\acgi\cookie_game\main.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
+ </File>
         </Files>
         <Globals>
         </Globals>

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_echo/acgi_echo.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_echo/acgi_echo.vcproj (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_echo/acgi_echo.vcproj 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -173,28 +173,10 @@
         <References>
         </References>
         <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ <File
+ RelativePath="..\..\..\..\..\example\acgi\echo\main.cpp"
>
- <File
- RelativePath="..\..\..\..\..\example\acgi\echo\main.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
+ </File>
         </Files>
         <Globals>
         </Globals>

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_hello_world/acgi_hello_world.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_hello_world/acgi_hello_world.vcproj (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/acgi_hello_world/acgi_hello_world.vcproj 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -169,28 +169,10 @@
         <References>
         </References>
         <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ <File
+ RelativePath="..\..\..\..\..\example\acgi\hello_world\main.cpp"
>
- <File
- RelativePath="..\..\..\..\..\example\acgi\hello_world\main.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
+ </File>
         </Files>
         <Globals>
         </Globals>

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world/cgi_hello_world.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world/cgi_hello_world.vcproj (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_hello_world/cgi_hello_world.vcproj 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -171,28 +171,10 @@
         <References>
         </References>
         <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ <File
+ RelativePath="..\..\..\..\..\example\cgi\hello_world\main.cpp"
>
- <File
- RelativePath="..\..\..\..\..\example\cgi\hello_world\main.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
+ </File>
         </Files>
         <Globals>
         </Globals>

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/cgi.qbk
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/cgi.qbk (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/cgi.qbk 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -8,7 +8,6 @@
 [library CGI
     [quickbook 1.4]
     [version 0.01]
- [id boost.cgi]
     [dirname the_document_dir]
     [copyright 2007 2008 Darren Garvey]
     [purpose Thoughts about CGI implementation]
@@ -87,6 +86,8 @@
 
 [include:intro introduction.qbk]
 
+[include quickstart.qbk]
+
 [include user_guide.qbk]
 
 [/include:tutorial user_guide/tutorial.qbk]
@@ -110,3 +111,7 @@
 [include troubleshooting.qbk]
 
 [include acknowledgements.qbk]
+
+[xinclude index.xml]
+
+[include reference.qbk]

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/reference.qbk
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/reference.qbk (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/reference.qbk 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -1,67 +1,25972 @@
 [/
- / Copyright (c) 2007 Darren Garvey
+ / Copyright (c) 2009 Darren Garvey (darren at omnisplat dot com)
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  /]
 
-[section:ref Reference]
+[section:reference Reference]
 
-[xinclude ../autodoc.xml]
+[xinclude quickref.xml]
 
-[section Quick Reference]
 
-Reference coming...
+[section:common__error__cgi_errors__gt_ common::error::cgi_errors >]
 
-Requests
-
- * Request Data
- * environment
- * member variables
- * env (request meta-data)
- * get (GET data)
- * post (POST data)
- * cookies (cookie data)
- * form (GET, POST or env data, depending on the request method)
- * member functions
- * script_name()
- * request_method()
- * content_length()
- * content_encoding()
- * etc...
- * constructors
- * load()
- * async_load()
- * close()
- * clear()
- * id()
- * client()
-
-Acceptor
-
- * constructors
- * accept()
- * async_accept()
- * cancel()
-
-
-Service
-
- * run()
- * stop()
- * reset()
- * get_io_service()
-
-Responses
-
- * operator<<
- * send()
- * clear()
- * data()
- * charset() // get / set the charset of the request.
- * content_length()
 
-[endsect] [/ quick_reference]
 
-[endsect] [/ ref]
+ template<>
+ struct is_error_code_enum< ::cgi::common::error::cgi_errors >
 
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__error__cgi_errors__gt_.BOOST_STATIC_CONSTANT [*BOOST_STATIC_CONSTANT]]]
+ []
+ ]
+
+]
+
+
+[section:BOOST_STATIC_CONSTANT common::error::cgi_errors >::BOOST_STATIC_CONSTANT]
+
+[indexterm2 BOOST_STATIC_CONSTANT..common::error::cgi_errors >]
+
+ BOOST_STATIC_CONSTANT(
+ bool ,
+ value = true);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:error__fcgi_errors__gt_ error::fcgi_errors >]
+
+
+
+ template<>
+ struct is_error_code_enum< ::cgi::error::fcgi_errors >
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.error__fcgi_errors__gt_.BOOST_STATIC_CONSTANT [*BOOST_STATIC_CONSTANT]]]
+ []
+ ]
+
+]
+
+
+[section:BOOST_STATIC_CONSTANT error::fcgi_errors >::BOOST_STATIC_CONSTANT]
+
+[indexterm2 BOOST_STATIC_CONSTANT..error::fcgi_errors >]
+
+ BOOST_STATIC_CONSTANT(
+ bool ,
+ value = true);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:acgi__acceptor acgi::acceptor]
+
+[indexterm1 acgi::acceptor] Typedef for common usage (ACGI).
+
+ typedef ::cgi::common::basic_request_acceptor< acgi_request_acceptor_service<> > acceptor;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.next_layer_type [*next_layer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.port_number_type [*port_number_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.service_type [*service_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.accept [*accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.assign [*assign]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.async_accept [*async_accept]]]
+ [Asynchronously accept one request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.basic_request_acceptor [*basic_request_acceptor]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.close [*close]]]
+ [Close the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.is_open [*is_open]]]
+ [Check if the acceptor is open. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.listen [*listen]]]
+ [Set the acceptor to listen. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.native [*native]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.open [*open]]]
+ [Open the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.protocol_service [*protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor._basic_request_acceptor [*~basic_request_acceptor]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:acgi__request acgi::request]
+
+[indexterm1 acgi::request]
+
+ typedef common::basic_request< acgi::request_service, acgi::service > request;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.base_type [*base_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.clear [*clear]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.client [*client]]]
+ [Return the connection associated with the request. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.is_open [*is_open]]]
+ [Return if the request is still open. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.request_service [*request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.set_service [*set_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.set_status [*set_status]]]
+ [Set the request status. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.read_env_vars [*read_env_vars]]]
+ [Read the environment variables into an internal map. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.id [*id]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:acgi__request_impl acgi::request_impl]
+
+
+
+ class request_impl
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.acgi__request_impl.client_type [*client_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_impl.conn_ptr [*conn_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_impl.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_impl.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_impl.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_impl.connection [*connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.http_status [*http_status]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.request_impl [*request_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.status [*status]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.stdin_parsed [*stdin_parsed]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_impl.service_ [*service_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.stdin_bytes_left_ [*stdin_bytes_left_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.stdin_data_read_ [*stdin_data_read_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.stdin_parsed_ [*stdin_parsed_]]]
+ []
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_impl.connection_ [*connection_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.http_status_ [*http_status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_impl.request_status_ [*request_status_]]]
+ []
+ ]
+
+]
+
+
+[section:client_type acgi::request_impl::client_type]
+
+[indexterm2 client_type..acgi::request_impl]
+
+ typedef ::cgi::common::basic_client< connection_type, common::tags::acgi > client_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_ptr [*connection_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.async_read_some [*async_read_some]]]
+ [Asynchronously read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.async_write_some [*async_write_some]]]
+ [Asynchronously write some data to the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.basic_client [*basic_client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left [*bytes_left]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.connection [*connection]]]
+ [Get a shared_ptr of the connection associated with the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.read_some [*read_some]]]
+ [Read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.set_connection [*set_connection]]]
+ [Associate a connection with this client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.write_some [*write_some]]]
+ [Write some data to the client. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left_ [*bytes_left_]]]
+ []
+ ]
+
+]
+
+A client is for two things: 1. To hold a full-duplex connection (or separate input and output connections). 2. To hold any protocol-specific data about the request. For now, this means the internal 'request number' associated by FastCGI with each request (ie. so incoming/outgoing packets can be wrapped with data noting what request it relates to). 3. Buffering. Not sure about how far this should go yet, but probably no further than minimal buffering. 4. Share a connection. Since a multiplexing connection is shared between multiple clients, the client should be responsible for taking possesion of the connection for a period of time (so it can write a complete packet). This idea could be taken quite far into genericity by making clients aware of how busy the connection is and size its output packets accordingly... But I'm not doing that.
+
+
+
+[endsect]
+
+
+
+[section:conn_ptr acgi::request_impl::conn_ptr]
+
+[indexterm2 conn_ptr..acgi::request_impl]
+
+ typedef connection_type::pointer conn_ptr;
+
+
+
+
+[endsect]
+
+
+
+[section:connection acgi::request_impl::connection]
+
+[indexterm2 connection..acgi::request_impl]
+
+ conn_ptr & connection();
+
+
+
+[endsect]
+
+
+
+[section:connection_ acgi::request_impl::connection_]
+
+[indexterm2 connection_..acgi::request_impl]
+
+ conn_ptr connection_;
+
+
+
+[endsect]
+
+
+
+[section:connection_type acgi::request_impl::connection_type]
+
+[indexterm2 connection_type..acgi::request_impl]
+
+ typedef connections::async_stdio connection_type;
+
+
+
+
+[endsect]
+
+
+
+[section:http_status acgi::request_impl::http_status]
+
+[indexterm2 http_status..acgi::request_impl]
+
+ common::http::status_code & http_status();
+
+
+
+[endsect]
+
+
+
+[section:http_status_ acgi::request_impl::http_status_]
+
+[indexterm2 http_status_..acgi::request_impl]
+
+ common::http::status_code http_status_;
+
+
+
+[endsect]
+
+
+
+[section:map_type acgi::request_impl::map_type]
+
+[indexterm2 map_type..acgi::request_impl]
+
+ typedef ::cgi::common::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type acgi::request_impl::protocol_service_type]
+
+[indexterm2 protocol_service_type..acgi::request_impl]
+
+ typedef ::cgi::acgi::service protocol_service_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.ios_provider_type [*ios_provider_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.queue_type [*queue_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.set_type [*set_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.traits [*traits]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.basic_protocol_service [*basic_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.dispatch [*dispatch]]]
+ [Dispatch a handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.io_service [*io_service]]]
+ [Return an available io_service from the IoServiceProvider. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.post [*post]]]
+ [Post the handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.reset [*reset]]]
+ [Reset all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.run [*run]]]
+ [Run all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.stop [*stop]]]
+ [Stop all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service._basic_protocol_service [*~basic_protocol_service]]]
+ []
+ ]
+
+]
+
+Holds the request queue and the connection queue. It is also a wrapper around asio::io\_service
+
+
+
+[endsect]
+
+
+
+[section:protocol_type acgi::request_impl::protocol_type]
+
+[indexterm2 protocol_type..acgi::request_impl]
+
+ typedef protocol_service_type::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_impl acgi::request_impl::request_impl]
+
+[indexterm2 request_impl..acgi::request_impl]
+
+ request_impl();
+
+
+
+[endsect]
+
+
+
+[section:request_status_ acgi::request_impl::request_status_]
+
+[indexterm2 request_status_..acgi::request_impl]
+
+ common::request_status request_status_;
+
+
+
+[endsect]
+
+
+
+[section:service_ acgi::request_impl::service_]
+
+[indexterm2 service_..acgi::request_impl]
+
+ protocol_service_type * service_;
+
+
+
+[endsect]
+
+
+
+[section:status acgi::request_impl::status]
+
+[indexterm2 status..acgi::request_impl]
+
+ common::request_status & status();
+
+
+
+[endsect]
+
+
+
+[section:stdin_bytes_left_ acgi::request_impl::stdin_bytes_left_]
+
+[indexterm2 stdin_bytes_left_..acgi::request_impl]
+
+ std::size_t stdin_bytes_left_;
+
+
+
+[endsect]
+
+
+
+[section:stdin_data_read_ acgi::request_impl::stdin_data_read_]
+
+[indexterm2 stdin_data_read_..acgi::request_impl]
+
+ bool stdin_data_read_;
+
+
+
+[endsect]
+
+
+
+[section:stdin_parsed acgi::request_impl::stdin_parsed]
+
+[indexterm2 stdin_parsed..acgi::request_impl]
+
+ bool stdin_parsed();
+
+
+
+[endsect]
+
+
+
+[section:stdin_parsed_ acgi::request_impl::stdin_parsed_]
+
+[indexterm2 stdin_parsed_..acgi::request_impl]
+
+ bool stdin_parsed_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:acgi__request_service acgi::request_service]
+
+
+
+ class request_service :
+ public cgi_service_impl_base< acgi::request_impl >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.base_type [*base_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.clear [*clear]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.client [*client]]]
+ [Return the connection associated with the request. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.is_open [*is_open]]]
+ [Return if the request is still open. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.request_service [*request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.set_service [*set_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.set_status [*set_status]]]
+ [Set the request status. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.read_env_vars [*read_env_vars]]]
+ [Read the environment variables into an internal map. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.id [*id]]]
+ []
+ ]
+
+]
+
+
+[section:base_type acgi::request_service::base_type]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 base_type..acgi::request_service]
+
+ typedef common::request_base< self_type > base_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base [*impl_base]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__request_base.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+]
+
+This class provides generic member functions that can be used by any request type.
+
+
+
+[endsect]
+
+
+
+[section:clear acgi::request_service::clear]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 clear..acgi::request_service]
+
+ void clear(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:client acgi::request_service::client]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 client..acgi::request_service] Return the connection associated with the request.
+
+ implementation_type::client_type & client(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:close acgi::request_service::close]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 close..acgi::request_service]
+
+ int close(
+ implementation_type & impl,
+ common::http::status_code & http_s,
+ int status,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:construct acgi::request_service::construct]
+
+[indexterm2 construct..acgi::request_service]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:destroy acgi::request_service::destroy]
+
+[indexterm2 destroy..acgi::request_service]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:get_role acgi::request_service::get_role]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 get_role..acgi::request_service]
+
+ role_type get_role(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:id acgi::request_service::id]
+
+[indexterm2 id..acgi::request_service]
+
+ static boost::asio::detail::service_id< request_service > id;
+
+
+
+[endsect]
+
+
+
+[section:is_file acgi::request_service::is_file]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 is_file..acgi::request_service] Check if a given POST variable represents a file upload.
+
+ bool is_file(
+ ImplType & impl,
+ typename ImplType::string_type const & key);
+
+
+
+[endsect]
+
+
+
+[section:is_open acgi::request_service::is_open]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 is_open..acgi::request_service] Return if the request is still open.
+
+ bool is_open(
+ implementation_type & impl);
+
+
+For CGI, this always returns true. However, in the case that a "Location: xxx" header is sent and the header is terminated, the request can be taken to be 'closed'.
+
+
+[endsect]
+
+
+[section:load acgi::request_service::load]
+
+[indexterm2 load..acgi::request_service] Synchronously read/parse the request meta-data.
+
+ boost::system::error_code ``[link cgi.reference.acgi__request_service.load.overload1 load]``(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+ boost::system::error_code & ``[link cgi.reference.acgi__request_service.load.overload2 load]``(
+ implementation_type & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+[section:overload1 acgi::request_service::load (1 of 2 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Synchronously read/parse the request meta-data.
+
+ boost::system::error_code load(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 acgi::request_service::load (2 of 2 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+Synchronously read/parse the request data.
+
+ boost::system::error_code & load(
+ implementation_type & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:load_environment acgi::request_service::load_environment]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 load_environment..acgi::request_service] Load the base_environment into the current environment.
+
+ void load_environment(
+ ImplType & impl,
+ char ** base_environment,
+ bool is_command_line);
+
+
+Parsed the base\_environment and add it to the current request's environment. This overwrites any environment variables with the existing key.
+
+If `is\_command\_line` is true, then the first argument is skipped as this is the name of the program and ignored. Using it actually causes a crash on Windows (MSVC 9) anyway: I'm not exactly sure why.
+
+
+[endsect]
+
+
+
+[section:map_type acgi::request_service::map_type]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 map_type..acgi::request_service]
+
+ typedef ::cgi::common::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:parse_cookie_vars acgi::request_service::parse_cookie_vars]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 parse_cookie_vars..acgi::request_service] Read and parse the HTTP_COOKIE meta variable.
+
+ boost::system::error_code parse_cookie_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_get_vars acgi::request_service::parse_get_vars]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 parse_get_vars..acgi::request_service] Read and parse the cgi GET meta variables.
+
+ boost::system::error_code parse_get_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_post_vars acgi::request_service::parse_post_vars]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 parse_post_vars..acgi::request_service] Read and parse the cgi POST meta variables (greedily).
+
+ boost::system::error_code parse_post_vars(
+ RequestImpl & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type acgi::request_service::protocol_service_type]
+
+[indexterm2 protocol_service_type..acgi::request_service]
+
+ typedef acgi::service protocol_service_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.ios_provider_type [*ios_provider_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.queue_type [*queue_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.set_type [*set_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.traits [*traits]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.basic_protocol_service [*basic_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.dispatch [*dispatch]]]
+ [Dispatch a handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.io_service [*io_service]]]
+ [Return an available io_service from the IoServiceProvider. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.post [*post]]]
+ [Post the handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.reset [*reset]]]
+ [Reset all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.run [*run]]]
+ [Run all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.stop [*stop]]]
+ [Stop all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service._basic_protocol_service [*~basic_protocol_service]]]
+ []
+ ]
+
+]
+
+Holds the request queue and the connection queue. It is also a wrapper around asio::io\_service
+
+
+
+[endsect]
+
+
+
+[section:protocol_type acgi::request_service::protocol_type]
+
+[indexterm2 protocol_type..acgi::request_service]
+
+ typedef common::tags::acgi protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:read_env_vars acgi::request_service::read_env_vars]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 read_env_vars..acgi::request_service] Read the environment variables into an internal map.
+
+ boost::system::error_code read_env_vars(
+ RequestImpl & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[section:read_some acgi::request_service::read_some]
+
+[indexterm2 read_some..acgi::request_service] Read some data from the client into the supplied buffer.
+
+ std::size_t ``[link cgi.reference.acgi__request_service.read_some.overload1 read_some]``(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ std::size_t ``[link cgi.reference.acgi__request_service.read_some.overload2 read_some]``(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+ std::size_t ``[link cgi.reference.acgi__request_service.read_some.overload3 read_some]``(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+[section:overload1 acgi::request_service::read_some (1 of 3 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Read some data from the client into the supplied buffer.
+
+ std::size_t read_some(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 acgi::request_service::read_some (2 of 3 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Read some data into the internal buffer.
+
+ std::size_t read_some(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload3 acgi::request_service::read_some (3 of 3 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+
+
+ std::size_t read_some(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:request_id acgi::request_service::request_id]
+
+[indexterm2 request_id..acgi::request_service] Get the request ID of a FastCGI request, or 1.
+
+ boost::uint16_t const & ``[link cgi.reference.acgi__request_service.request_id.overload1 request_id]``(
+ ImplType & impl) const;
+
+ int ``[link cgi.reference.acgi__request_service.request_id.overload2 request_id]``(
+ implementation_type & impl);
+
+
+[section:overload1 acgi::request_service::request_id (1 of 2 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Get the request ID of a FastCGI request, or 1.
+
+ boost::uint16_t const & request_id(
+ ImplType & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 acgi::request_service::request_id (2 of 2 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+
+
+ int request_id(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:request_service acgi::request_service::request_service]
+
+[indexterm2 request_service..acgi::request_service]
+
+ request_service(
+ common::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:self_type acgi::request_service::self_type]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 self_type..acgi::request_service]
+
+ typedef cgi_service_impl_base< acgi::request_impl > self_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.base_type [*base_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__callback_functor [*callback_functor]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.self_type [*self_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.cgi_service_impl_base [*cgi_service_impl_base]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.clear [*clear]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.client [*client]]]
+ [Return the connection associated with the request. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.is_open [*is_open]]]
+ [Return if the request is still open. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.set_status [*set_status]]]
+ [Set the request status. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.read_env_vars [*read_env_vars]]]
+ [Read the environment variables into an internal map. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:set_service acgi::request_service::set_service]
+
+[indexterm2 set_service..acgi::request_service]
+
+ void set_service(
+ implementation_type & impl,
+ protocol_service_type & ps);
+
+
+
+[endsect]
+
+
+[section:set_status acgi::request_service::set_status]
+
+[indexterm2 set_status..acgi::request_service] Set the request status.
+
+ void ``[link cgi.reference.acgi__request_service.set_status.overload1 set_status]``(
+ implementation_type & impl,
+ common::request_status status);
+
+ void ``[link cgi.reference.acgi__request_service.set_status.overload2 set_status]``(
+ implementation_type & impl,
+ common::http::status_code & );
+
+
+[section:overload1 acgi::request_service::set_status (1 of 2 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+Set the request status.
+
+ void set_status(
+ implementation_type & impl,
+ common::request_status status);
+
+
+
+[endsect]
+
+
+
+[section:overload2 acgi::request_service::set_status (2 of 2 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+Set the http status (this does nothing for aCGI).
+
+ void set_status(
+ implementation_type & impl,
+ common::http::status_code & );
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:shutdown_service acgi::request_service::shutdown_service]
+
+[indexterm2 shutdown_service..acgi::request_service]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[section:type acgi::request_service::type]
+
+[indexterm2 type..acgi::request_service]
+
+ typedef request_service type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.base_type [*base_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.acgi__request_service.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.clear [*clear]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.client [*client]]]
+ [Return the connection associated with the request. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.is_open [*is_open]]]
+ [Return if the request is still open. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.request_service [*request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.set_service [*set_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.set_status [*set_status]]]
+ [Set the request status. ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.acgi__request_service.read_env_vars [*read_env_vars]]]
+ [Read the environment variables into an internal map. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.acgi__request_service.id [*id]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:acgi__service acgi::service]
+
+[indexterm1 acgi::service]
+
+ typedef common::basic_protocol_service< common::tags::acgi > service;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.ios_provider_type [*ios_provider_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.queue_type [*queue_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.set_type [*set_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.traits [*traits]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.basic_protocol_service [*basic_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.dispatch [*dispatch]]]
+ [Dispatch a handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.io_service [*io_service]]]
+ [Return an available io_service from the IoServiceProvider. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.post [*post]]]
+ [Post the handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.reset [*reset]]]
+ [Reset all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.run [*run]]]
+ [Run all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.stop [*stop]]]
+ [Stop all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service._basic_protocol_service [*~basic_protocol_service]]]
+ []
+ ]
+
+]
+
+Holds the request queue and the connection queue. It is also a wrapper around asio::io\_service
+
+
+
+[endsect]
+
+
+[section:cgi_request_impl cgi_request_impl]
+
+Implementation for a standard CGI request.
+
+ class cgi_request_impl
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.cgi_request_impl.client_type [*client_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_request_impl.conn_ptr [*conn_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_request_impl.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_request_impl.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_request_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_request_impl.cgi_request_impl [*cgi_request_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_impl.connection [*connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_impl.http_status [*http_status]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_impl.status [*status]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_impl.stdin_parsed [*stdin_parsed]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_request_impl.stdin_bytes_left_ [*stdin_bytes_left_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_impl.stdin_data_read_ [*stdin_data_read_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_impl.stdin_parsed_ [*stdin_parsed_]]]
+ []
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_request_impl.connection_ [*connection_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_impl.http_status_ [*http_status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_impl.request_status_ [*request_status_]]]
+ []
+ ]
+
+]
+
+Note: This isn't noncopyable since there's no real reason it can't be copied around. Since basic\_request is noncopyable, basic copying will be restricted but if someone really wants to copy the data, then they can.
+
+[section:cgi_request_impl cgi_request_impl::cgi_request_impl]
+
+[indexterm2 cgi_request_impl..cgi_request_impl]
+
+ ``[link cgi.reference.cgi_request_impl.cgi_request_impl.overload1 cgi_request_impl]``();
+
+ template<
+ typename ProtocolService >
+ ``[link cgi.reference.cgi_request_impl.cgi_request_impl.overload2 cgi_request_impl]``(
+ ProtocolService & pserv);
+
+
+[section:overload1 cgi_request_impl::cgi_request_impl (1 of 2 overloads)]
+
+
+
+ cgi_request_impl();
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_request_impl::cgi_request_impl (2 of 2 overloads)]
+
+Constructor.
+
+ template<
+ typename ProtocolService >
+ cgi_request_impl(
+ ProtocolService & pserv);
+
+
+Since this request type is synchronous, there is no need for an io\_service, so the passed ProtocolService is just ignored.
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:client_type cgi_request_impl::client_type]
+
+[indexterm2 client_type..cgi_request_impl]
+
+ typedef common::basic_client< connections::stdio, common::tags::cgi > client_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_ptr [*connection_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.async_read_some [*async_read_some]]]
+ [Asynchronously read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.async_write_some [*async_write_some]]]
+ [Asynchronously write some data to the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.basic_client [*basic_client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left [*bytes_left]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.connection [*connection]]]
+ [Get a shared_ptr of the connection associated with the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.read_some [*read_some]]]
+ [Read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.set_connection [*set_connection]]]
+ [Associate a connection with this client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.write_some [*write_some]]]
+ [Write some data to the client. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left_ [*bytes_left_]]]
+ []
+ ]
+
+]
+
+A client is for two things: 1. To hold a full-duplex connection (or separate input and output connections). 2. To hold any protocol-specific data about the request. For now, this means the internal 'request number' associated by FastCGI with each request (ie. so incoming/outgoing packets can be wrapped with data noting what request it relates to). 3. Buffering. Not sure about how far this should go yet, but probably no further than minimal buffering. 4. Share a connection. Since a multiplexing connection is shared between multiple clients, the client should be responsible for taking possesion of the connection for a period of time (so it can write a complete packet). This idea could be taken quite far into genericity by making clients aware of how busy the connection is and size its output packets accordingly... But I'm not doing that.
+
+
+
+[endsect]
+
+
+
+[section:conn_ptr cgi_request_impl::conn_ptr]
+
+[indexterm2 conn_ptr..cgi_request_impl]
+
+ typedef connection_type::pointer conn_ptr;
+
+
+
+
+[endsect]
+
+
+
+[section:connection cgi_request_impl::connection]
+
+[indexterm2 connection..cgi_request_impl]
+
+ conn_ptr & connection();
+
+
+
+[endsect]
+
+
+
+[section:connection_ cgi_request_impl::connection_]
+
+[indexterm2 connection_..cgi_request_impl]
+
+ conn_ptr connection_;
+
+
+
+[endsect]
+
+
+
+[section:connection_type cgi_request_impl::connection_type]
+
+[indexterm2 connection_type..cgi_request_impl]
+
+ typedef connections::stdio connection_type;
+
+
+
+
+[endsect]
+
+
+
+[section:http_status cgi_request_impl::http_status]
+
+[indexterm2 http_status..cgi_request_impl]
+
+ common::http::status_code & http_status();
+
+
+
+[endsect]
+
+
+
+[section:http_status_ cgi_request_impl::http_status_]
+
+[indexterm2 http_status_..cgi_request_impl]
+
+ common::http::status_code http_status_;
+
+
+
+[endsect]
+
+
+
+[section:map_type cgi_request_impl::map_type]
+
+[indexterm2 map_type..cgi_request_impl]
+
+ typedef ::cgi::common::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type cgi_request_impl::protocol_type]
+
+[indexterm2 protocol_type..cgi_request_impl]
+
+ typedef common::tags::cgi protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_status_ cgi_request_impl::request_status_]
+
+[indexterm2 request_status_..cgi_request_impl]
+
+ common::request_status request_status_;
+
+
+
+[endsect]
+
+
+
+[section:status cgi_request_impl::status]
+
+[indexterm2 status..cgi_request_impl]
+
+ common::request_status & status();
+
+
+
+[endsect]
+
+
+
+[section:stdin_bytes_left_ cgi_request_impl::stdin_bytes_left_]
+
+[indexterm2 stdin_bytes_left_..cgi_request_impl]
+
+ std::size_t stdin_bytes_left_;
+
+
+
+[endsect]
+
+
+
+[section:stdin_data_read_ cgi_request_impl::stdin_data_read_]
+
+[indexterm2 stdin_data_read_..cgi_request_impl]
+
+ bool stdin_data_read_;
+
+
+
+[endsect]
+
+
+
+[section:stdin_parsed cgi_request_impl::stdin_parsed]
+
+[indexterm2 stdin_parsed..cgi_request_impl]
+
+ bool stdin_parsed();
+
+
+
+[endsect]
+
+
+
+[section:stdin_parsed_ cgi_request_impl::stdin_parsed_]
+
+[indexterm2 stdin_parsed_..cgi_request_impl]
+
+ bool stdin_parsed_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:cgi_request_service cgi_request_service]
+
+
+
+ class cgi_request_service :
+ public cgi_service_impl_base< cgi_request_impl >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.cgi_request_service.base_type [*base_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_request_service.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_request_service.self_type [*self_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_request_service.cgi_request_service [*cgi_request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.clear [*clear]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.client [*client]]]
+ [Return the connection associated with the request. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.is_open [*is_open]]]
+ [Return if the request is still open. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.set_status [*set_status]]]
+ [Set the request status. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_request_service.read_env_vars [*read_env_vars]]]
+ [Read the environment variables into an internal map. ]
+ ]
+
+]
+
+
+[section:base_type cgi_request_service::base_type]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 base_type..cgi_request_service]
+
+ typedef common::request_base< self_type > base_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base [*impl_base]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__request_base.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+]
+
+This class provides generic member functions that can be used by any request type.
+
+
+
+[endsect]
+
+
+[section:cgi_request_service cgi_request_service::cgi_request_service]
+
+[indexterm2 cgi_request_service..cgi_request_service]
+
+ template<
+ typename T >
+ ``[link cgi.reference.cgi_request_service.cgi_request_service.overload1 cgi_request_service]``(
+ T & );
+
+ ``[link cgi.reference.cgi_request_service.cgi_request_service.overload2 cgi_request_service]``();
+
+
+[section:overload1 cgi_request_service::cgi_request_service (1 of 2 overloads)]
+
+
+
+ template<
+ typename T >
+ cgi_request_service(
+ T & );
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_request_service::cgi_request_service (2 of 2 overloads)]
+
+
+
+ cgi_request_service();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:clear cgi_request_service::clear]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 clear..cgi_request_service]
+
+ void clear(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:client cgi_request_service::client]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 client..cgi_request_service] Return the connection associated with the request.
+
+ implementation_type::client_type & client(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:close cgi_request_service::close]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 close..cgi_request_service]
+
+ int close(
+ implementation_type & impl,
+ common::http::status_code & http_s,
+ int status,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:construct cgi_request_service::construct]
+
+[indexterm2 construct..cgi_request_service]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:destroy cgi_request_service::destroy]
+
+[indexterm2 destroy..cgi_request_service]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:get_role cgi_request_service::get_role]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 get_role..cgi_request_service]
+
+ role_type get_role(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:is_file cgi_request_service::is_file]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 is_file..cgi_request_service] Check if a given POST variable represents a file upload.
+
+ bool is_file(
+ ImplType & impl,
+ typename ImplType::string_type const & key);
+
+
+
+[endsect]
+
+
+
+[section:is_open cgi_request_service::is_open]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 is_open..cgi_request_service] Return if the request is still open.
+
+ bool is_open(
+ implementation_type & impl);
+
+
+For CGI, this always returns true. However, in the case that a "Location: xxx" header is sent and the header is terminated, the request can be taken to be 'closed'.
+
+
+[endsect]
+
+
+[section:load cgi_request_service::load]
+
+[indexterm2 load..cgi_request_service] Synchronously read/parse the request meta-data.
+
+ boost::system::error_code ``[link cgi.reference.cgi_request_service.load.overload1 load]``(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+ boost::system::error_code & ``[link cgi.reference.cgi_request_service.load.overload2 load]``(
+ implementation_type & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+[section:overload1 cgi_request_service::load (1 of 2 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Synchronously read/parse the request meta-data.
+
+ boost::system::error_code load(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_request_service::load (2 of 2 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+Synchronously read/parse the request data.
+
+ boost::system::error_code & load(
+ implementation_type & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:load_environment cgi_request_service::load_environment]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 load_environment..cgi_request_service] Load the base_environment into the current environment.
+
+ void load_environment(
+ ImplType & impl,
+ char ** base_environment,
+ bool is_command_line);
+
+
+Parsed the base\_environment and add it to the current request's environment. This overwrites any environment variables with the existing key.
+
+If `is\_command\_line` is true, then the first argument is skipped as this is the name of the program and ignored. Using it actually causes a crash on Windows (MSVC 9) anyway: I'm not exactly sure why.
+
+
+[endsect]
+
+
+
+[section:map_type cgi_request_service::map_type]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 map_type..cgi_request_service]
+
+ typedef ::cgi::common::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:parse_cookie_vars cgi_request_service::parse_cookie_vars]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 parse_cookie_vars..cgi_request_service] Read and parse the HTTP_COOKIE meta variable.
+
+ boost::system::error_code parse_cookie_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_get_vars cgi_request_service::parse_get_vars]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 parse_get_vars..cgi_request_service] Read and parse the cgi GET meta variables.
+
+ boost::system::error_code parse_get_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_post_vars cgi_request_service::parse_post_vars]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 parse_post_vars..cgi_request_service] Read and parse the cgi POST meta variables (greedily).
+
+ boost::system::error_code parse_post_vars(
+ RequestImpl & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type cgi_request_service::protocol_type]
+
+[indexterm2 protocol_type..cgi_request_service]
+
+ typedef common::tags::cgi protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:read_env_vars cgi_request_service::read_env_vars]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 read_env_vars..cgi_request_service] Read the environment variables into an internal map.
+
+ boost::system::error_code read_env_vars(
+ RequestImpl & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[section:read_some cgi_request_service::read_some]
+
+[indexterm2 read_some..cgi_request_service] Read some data from the client into the supplied buffer.
+
+ std::size_t ``[link cgi.reference.cgi_request_service.read_some.overload1 read_some]``(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ std::size_t ``[link cgi.reference.cgi_request_service.read_some.overload2 read_some]``(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+ std::size_t ``[link cgi.reference.cgi_request_service.read_some.overload3 read_some]``(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+[section:overload1 cgi_request_service::read_some (1 of 3 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Read some data from the client into the supplied buffer.
+
+ std::size_t read_some(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_request_service::read_some (2 of 3 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Read some data into the internal buffer.
+
+ std::size_t read_some(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload3 cgi_request_service::read_some (3 of 3 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+
+
+ std::size_t read_some(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:request_id cgi_request_service::request_id]
+
+[indexterm2 request_id..cgi_request_service] Get the request ID of a FastCGI request, or 1.
+
+ boost::uint16_t const & ``[link cgi.reference.cgi_request_service.request_id.overload1 request_id]``(
+ ImplType & impl) const;
+
+ int ``[link cgi.reference.cgi_request_service.request_id.overload2 request_id]``(
+ implementation_type & impl);
+
+
+[section:overload1 cgi_request_service::request_id (1 of 2 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Get the request ID of a FastCGI request, or 1.
+
+ boost::uint16_t const & request_id(
+ ImplType & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_request_service::request_id (2 of 2 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+
+
+ int request_id(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:self_type cgi_request_service::self_type]
+
+
+['Inherited from cgi_service_impl_base.]
+
+[indexterm2 self_type..cgi_request_service]
+
+ typedef cgi_service_impl_base< cgi_request_impl > self_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.base_type [*base_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__callback_functor [*callback_functor]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.self_type [*self_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.cgi_service_impl_base [*cgi_service_impl_base]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.clear [*clear]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.client [*client]]]
+ [Return the connection associated with the request. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.is_open [*is_open]]]
+ [Return if the request is still open. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.set_status [*set_status]]]
+ [Set the request status. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.read_env_vars [*read_env_vars]]]
+ [Read the environment variables into an internal map. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:set_status cgi_request_service::set_status]
+
+[indexterm2 set_status..cgi_request_service] Set the request status.
+
+ void ``[link cgi.reference.cgi_request_service.set_status.overload1 set_status]``(
+ implementation_type & impl,
+ common::request_status status);
+
+ void ``[link cgi.reference.cgi_request_service.set_status.overload2 set_status]``(
+ implementation_type & impl,
+ common::http::status_code & );
+
+
+[section:overload1 cgi_request_service::set_status (1 of 2 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+Set the request status.
+
+ void set_status(
+ implementation_type & impl,
+ common::request_status status);
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_request_service::set_status (2 of 2 overloads)]
+
+
+['Inherited from cgi_service_impl_base.]
+
+Set the http status (this does nothing for aCGI).
+
+ void set_status(
+ implementation_type & impl,
+ common::http::status_code & );
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:cgi_service_impl_base cgi_service_impl_base]
+
+
+
+ template<
+ typename ``[link cgi.reference.RequestImplType RequestImplType]``>
+ class cgi_service_impl_base :
+ public common::request_base< cgi_service_impl_base< RequestImplType > >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.base_type [*base_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__callback_functor [*callback_functor]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.self_type [*self_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.cgi_service_impl_base [*cgi_service_impl_base]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.clear [*clear]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.client [*client]]]
+ [Return the connection associated with the request. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.is_open [*is_open]]]
+ [Return if the request is still open. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.set_status [*set_status]]]
+ [Set the request status. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.read_env_vars [*read_env_vars]]]
+ [Read the environment variables into an internal map. ]
+ ]
+
+]
+
+
+[section:base_type cgi_service_impl_base::base_type]
+
+[indexterm2 base_type..cgi_service_impl_base]
+
+ typedef common::request_base< self_type > base_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base [*impl_base]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__request_base.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+]
+
+This class provides generic member functions that can be used by any request type.
+
+
+
+[endsect]
+
+
+[section:cgi_service_impl_base cgi_service_impl_base::cgi_service_impl_base]
+
+[indexterm2 cgi_service_impl_base..cgi_service_impl_base]
+
+ template<
+ typename T >
+ ``[link cgi.reference.cgi_service_impl_base.cgi_service_impl_base.overload1 cgi_service_impl_base]``(
+ T & );
+
+ ``[link cgi.reference.cgi_service_impl_base.cgi_service_impl_base.overload2 cgi_service_impl_base]``();
+
+
+[section:overload1 cgi_service_impl_base::cgi_service_impl_base (1 of 2 overloads)]
+
+
+
+ template<
+ typename T >
+ cgi_service_impl_base(
+ T & );
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_service_impl_base::cgi_service_impl_base (2 of 2 overloads)]
+
+
+
+ cgi_service_impl_base();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:clear cgi_service_impl_base::clear]
+
+[indexterm2 clear..cgi_service_impl_base]
+
+ void clear(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:client cgi_service_impl_base::client]
+
+[indexterm2 client..cgi_service_impl_base] Return the connection associated with the request.
+
+ implementation_type::client_type & client(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:close cgi_service_impl_base::close]
+
+[indexterm2 close..cgi_service_impl_base]
+
+ int close(
+ implementation_type & impl,
+ common::http::status_code & http_s,
+ int status,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:get_role cgi_service_impl_base::get_role]
+
+[indexterm2 get_role..cgi_service_impl_base]
+
+ role_type get_role(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:is_file cgi_service_impl_base::is_file]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 is_file..cgi_service_impl_base] Check if a given POST variable represents a file upload.
+
+ bool is_file(
+ ImplType & impl,
+ typename ImplType::string_type const & key);
+
+
+
+[endsect]
+
+
+
+[section:is_open cgi_service_impl_base::is_open]
+
+[indexterm2 is_open..cgi_service_impl_base] Return if the request is still open.
+
+ bool is_open(
+ implementation_type & impl);
+
+
+For CGI, this always returns true. However, in the case that a "Location: xxx" header is sent and the header is terminated, the request can be taken to be 'closed'.
+
+
+[endsect]
+
+
+[section:load cgi_service_impl_base::load]
+
+[indexterm2 load..cgi_service_impl_base] Synchronously read/parse the request meta-data.
+
+ boost::system::error_code ``[link cgi.reference.cgi_service_impl_base.load.overload1 load]``(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+ boost::system::error_code & ``[link cgi.reference.cgi_service_impl_base.load.overload2 load]``(
+ implementation_type & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+[section:overload1 cgi_service_impl_base::load (1 of 2 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Synchronously read/parse the request meta-data.
+
+ boost::system::error_code load(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_service_impl_base::load (2 of 2 overloads)]
+
+Synchronously read/parse the request data.
+
+ boost::system::error_code & load(
+ implementation_type & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:load_environment cgi_service_impl_base::load_environment]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 load_environment..cgi_service_impl_base] Load the base_environment into the current environment.
+
+ void load_environment(
+ ImplType & impl,
+ char ** base_environment,
+ bool is_command_line);
+
+
+Parsed the base\_environment and add it to the current request's environment. This overwrites any environment variables with the existing key.
+
+If `is\_command\_line` is true, then the first argument is skipped as this is the name of the program and ignored. Using it actually causes a crash on Windows (MSVC 9) anyway: I'm not exactly sure why.
+
+
+[endsect]
+
+
+
+[section:map_type cgi_service_impl_base::map_type]
+
+[indexterm2 map_type..cgi_service_impl_base]
+
+ typedef ::cgi::common::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:parse_cookie_vars cgi_service_impl_base::parse_cookie_vars]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 parse_cookie_vars..cgi_service_impl_base] Read and parse the HTTP_COOKIE meta variable.
+
+ boost::system::error_code parse_cookie_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_get_vars cgi_service_impl_base::parse_get_vars]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 parse_get_vars..cgi_service_impl_base] Read and parse the cgi GET meta variables.
+
+ boost::system::error_code parse_get_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_post_vars cgi_service_impl_base::parse_post_vars]
+
+[indexterm2 parse_post_vars..cgi_service_impl_base] Read and parse the cgi POST meta variables (greedily).
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code parse_post_vars(
+ RequestImpl & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type cgi_service_impl_base::protocol_type]
+
+[indexterm2 protocol_type..cgi_service_impl_base]
+
+ typedef RequestImplType::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:read_env_vars cgi_service_impl_base::read_env_vars]
+
+[indexterm2 read_env_vars..cgi_service_impl_base] Read the environment variables into an internal map.
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code read_env_vars(
+ RequestImpl & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[section:read_some cgi_service_impl_base::read_some]
+
+[indexterm2 read_some..cgi_service_impl_base] Read some data from the client into the supplied buffer.
+
+ std::size_t ``[link cgi.reference.cgi_service_impl_base.read_some.overload1 read_some]``(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ std::size_t ``[link cgi.reference.cgi_service_impl_base.read_some.overload2 read_some]``(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+ std::size_t ``[link cgi.reference.cgi_service_impl_base.read_some.overload3 read_some]``(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+[section:overload1 cgi_service_impl_base::read_some (1 of 3 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Read some data from the client into the supplied buffer.
+
+ std::size_t read_some(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_service_impl_base::read_some (2 of 3 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Read some data into the internal buffer.
+
+ std::size_t read_some(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload3 cgi_service_impl_base::read_some (3 of 3 overloads)]
+
+
+
+ std::size_t read_some(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:request_id cgi_service_impl_base::request_id]
+
+[indexterm2 request_id..cgi_service_impl_base] Get the request ID of a FastCGI request, or 1.
+
+ boost::uint16_t const & ``[link cgi.reference.cgi_service_impl_base.request_id.overload1 request_id]``(
+ ImplType & impl) const;
+
+ int ``[link cgi.reference.cgi_service_impl_base.request_id.overload2 request_id]``(
+ implementation_type & impl);
+
+
+[section:overload1 cgi_service_impl_base::request_id (1 of 2 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Get the request ID of a FastCGI request, or 1.
+
+ boost::uint16_t const & request_id(
+ ImplType & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_service_impl_base::request_id (2 of 2 overloads)]
+
+
+
+ int request_id(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:self_type cgi_service_impl_base::self_type]
+
+[indexterm2 self_type..cgi_service_impl_base]
+
+ typedef cgi_service_impl_base< RequestImplType > self_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.base_type [*base_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__callback_functor [*callback_functor]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base.self_type [*self_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.cgi_service_impl_base [*cgi_service_impl_base]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.clear [*clear]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.client [*client]]]
+ [Return the connection associated with the request. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.is_open [*is_open]]]
+ [Return if the request is still open. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.set_status [*set_status]]]
+ [Set the request status. ]
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base.read_env_vars [*read_env_vars]]]
+ [Read the environment variables into an internal map. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:set_status cgi_service_impl_base::set_status]
+
+[indexterm2 set_status..cgi_service_impl_base] Set the request status.
+
+ void ``[link cgi.reference.cgi_service_impl_base.set_status.overload1 set_status]``(
+ implementation_type & impl,
+ common::request_status status);
+
+ void ``[link cgi.reference.cgi_service_impl_base.set_status.overload2 set_status]``(
+ implementation_type & impl,
+ common::http::status_code & );
+
+
+[section:overload1 cgi_service_impl_base::set_status (1 of 2 overloads)]
+
+Set the request status.
+
+ void set_status(
+ implementation_type & impl,
+ common::request_status status);
+
+
+
+[endsect]
+
+
+
+[section:overload2 cgi_service_impl_base::set_status (2 of 2 overloads)]
+
+Set the http status (this does nothing for aCGI).
+
+ void set_status(
+ implementation_type & impl,
+ common::http::status_code & );
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:cgi_service_impl_base__callback_functor cgi_service_impl_base::callback_functor]
+
+
+
+ template<
+ typename Service >
+ struct callback_functor
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base__callback_functor.callback_functor [*callback_functor]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base__callback_functor.operator() [*operator()]]]
+ []
+ ]
+
+]
+
+
+[section:callback_functor cgi_service_impl_base::callback_functor::callback_functor]
+
+[indexterm2 callback_functor..cgi_service_impl_base::callback_functor]
+
+ callback_functor(
+ implementation_type & impl,
+ Service * service);
+
+
+
+[endsect]
+
+
+
+[section:operator() cgi_service_impl_base::callback_functor::operator()]
+
+[indexterm2 operator()..cgi_service_impl_base::callback_functor]
+
+ std::size_t operator()(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:cgi_service_impl_base__implementation_type cgi_service_impl_base::implementation_type]
+
+
+
+ struct implementation_type :
+ common::request_base< T >::impl_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__implementation_type.client_type [*client_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.cgi_service_impl_base__implementation_type.form_parser_type [*form_parser_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base__implementation_type.implementation_type [*implementation_type]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base__implementation_type.characters_left_ [*characters_left_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base__implementation_type.client_ [*client_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.cgi_service_impl_base__implementation_type.fp_ [*fp_]]]
+ []
+ ]
+
+]
+
+
+[section:characters_left_ cgi_service_impl_base::implementation_type::characters_left_]
+
+[indexterm2 characters_left_..cgi_service_impl_base::implementation_type]
+
+ std::size_t characters_left_;
+
+
+
+[endsect]
+
+
+
+[section:client_ cgi_service_impl_base::implementation_type::client_]
+
+[indexterm2 client_..cgi_service_impl_base::implementation_type]
+
+ client_type client_;
+
+
+
+[endsect]
+
+
+
+[section:client_type cgi_service_impl_base::implementation_type::client_type]
+
+[indexterm2 client_type..cgi_service_impl_base::implementation_type]
+
+ typedef RequestImplType::client_type client_type;
+
+
+
+
+[endsect]
+
+
+
+[section:form_parser_type cgi_service_impl_base::implementation_type::form_parser_type]
+
+[indexterm2 form_parser_type..cgi_service_impl_base::implementation_type]
+
+ typedef detail::form_parser form_parser_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.buffer_type [*buffer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.callback_type [*callback_type]]]
+ [The callback functor to read more data. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser__context [*context]]]
+ [The context used for parsing. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.detail__form_parser.buffer_string [*buffer_string]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.form_parser [*form_parser]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.move_to_start_of_first_part [*move_to_start_of_first_part]]]
+ [Erase any front-cruft on the form data. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse [*parse]]]
+ [Run the parser on the given `context`. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse_boundary_marker [*parse_boundary_marker]]]
+ [Get the boundary marker from the CONTENT_TYPE header. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse_form_part [*parse_form_part]]]
+ [Parse a single form part. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse_multipart_form [*parse_multipart_form]]]
+ [Parse a multipart form. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse_url_encoded_form [*parse_url_encoded_form]]]
+ [URL-encoded forms. ]
+ ]
+
+]
+
+Construct this and then call `form\_parserparse` with an instance of form_parser::context (or compatible struct).
+
+This is minimal and doesn't extract all meta-data yet, but is known to work on Windows XP with MSVC9.0 and Ubuntu linux with gcc 4.2.x and 4.3.x.
+
+Valid Form Encodings > `application/x-www-form-urlencoded` > `multipart/form-data`
+
+File uploads (ie. in `multipart/form-data` forms) are saved to disk. See the `BOOST\_CGI\_UPLOAD\_DIRECTORY` macro.
+
+Should also work for HTTP POST data.
+
+
+
+[endsect]
+
+
+
+[section:fp_ cgi_service_impl_base::implementation_type::fp_]
+
+[indexterm2 fp_..cgi_service_impl_base::implementation_type]
+
+ boost::scoped_ptr< form_parser_type > fp_;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type cgi_service_impl_base::implementation_type::implementation_type]
+
+[indexterm2 implementation_type..cgi_service_impl_base::implementation_type]
+
+ implementation_type();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_client common::basic_client]
+
+A client.
+
+ template<
+ typename Connection ,
+ typename Protocol >
+ class basic_client
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_ptr [*connection_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.async_read_some [*async_read_some]]]
+ [Asynchronously read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.async_write_some [*async_write_some]]]
+ [Asynchronously write some data to the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.basic_client [*basic_client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left [*bytes_left]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.connection [*connection]]]
+ [Get a shared_ptr of the connection associated with the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.read_some [*read_some]]]
+ [Read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.set_connection [*set_connection]]]
+ [Associate a connection with this client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.write_some [*write_some]]]
+ [Write some data to the client. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left_ [*bytes_left_]]]
+ []
+ ]
+
+]
+
+A client is for two things: 1. To hold a full-duplex connection (or separate input and output connections). 2. To hold any protocol-specific data about the request. For now, this means the internal 'request number' associated by FastCGI with each request (ie. so incoming/outgoing packets can be wrapped with data noting what request it relates to). 3. Buffering. Not sure about how far this should go yet, but probably no further than minimal buffering. 4. Share a connection. Since a multiplexing connection is shared between multiple clients, the client should be responsible for taking possesion of the connection for a period of time (so it can write a complete packet). This idea could be taken quite far into genericity by making clients aware of how busy the connection is and size its output packets accordingly... But I'm not doing that.
+
+
+[section:async_read_some common::basic_client::async_read_some]
+
+[indexterm2 async_read_some..common::basic_client] Asynchronously read some data from the client.
+
+ template<
+ typename MutableBufferSequence ,
+ typename Handler >
+ void async_read_some(
+ const MutableBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some common::basic_client::async_write_some]
+
+[indexterm2 async_write_some..common::basic_client] Asynchronously write some data to the client.
+
+ template<
+ typename ConstBufferSequence ,
+ typename Handler >
+ void async_write_some(
+ const ConstBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+[section:basic_client common::basic_client::basic_client]
+
+[indexterm2 basic_client..common::basic_client]
+
+ ``[link cgi.reference.common__basic_client.basic_client.overload1 basic_client]``(
+ io_service & ios);
+
+ ``[link cgi.reference.common__basic_client.basic_client.overload2 basic_client]``();
+
+
+[section:overload1 common::basic_client::basic_client (1 of 2 overloads)]
+
+
+
+ basic_client(
+ io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_client::basic_client (2 of 2 overloads)]
+
+
+
+ basic_client();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:bytes_left common::basic_client::bytes_left]
+
+[indexterm2 bytes_left..common::basic_client]
+
+ std::size_t & bytes_left();
+
+
+
+[endsect]
+
+
+
+[section:bytes_left_ common::basic_client::bytes_left_]
+
+[indexterm2 bytes_left_..common::basic_client]
+
+ std::size_t bytes_left_;
+
+
+
+[endsect]
+
+
+
+[section:close common::basic_client::close]
+
+[indexterm2 close..common::basic_client]
+
+ void close();
+
+
+
+[endsect]
+
+
+
+[section:connection common::basic_client::connection]
+
+[indexterm2 connection..common::basic_client] Get a shared_ptr of the connection associated with the client.
+
+ connection_ptr & connection();
+
+
+
+[endsect]
+
+
+
+[section:connection_ptr common::basic_client::connection_ptr]
+
+[indexterm2 connection_ptr..common::basic_client]
+
+ typedef connection_type::pointer connection_ptr;
+
+
+
+
+[endsect]
+
+
+
+[section:connection_type common::basic_client::connection_type]
+
+[indexterm2 connection_type..common::basic_client]
+
+ typedef Connection connection_type;
+
+
+
+
+[endsect]
+
+
+
+[section:is_open common::basic_client::is_open]
+
+[indexterm2 is_open..common::basic_client]
+
+ bool is_open();
+
+
+
+[endsect]
+
+
+
+[section:protocol_type common::basic_client::protocol_type]
+
+[indexterm2 protocol_type..common::basic_client]
+
+ typedef Protocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:read_some common::basic_client::read_some]
+
+[indexterm2 read_some..common::basic_client] Read some data from the client.
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:request_id common::basic_client::request_id]
+
+[indexterm2 request_id..common::basic_client]
+
+ boost::uint16_t const & request_id() const;
+
+
+
+[endsect]
+
+
+
+[section:set_connection common::basic_client::set_connection]
+
+[indexterm2 set_connection..common::basic_client] Associate a connection with this client.
+
+ bool set_connection(
+ const typename connection_type::pointer & conn);
+
+
+Note: the connection must have been created using the new operator
+
+bool set\_connection(connection\_type* conn) { make sure there isn't already a connection associated with the client if (!connection\_) return false; connection\_.reset(conn); return true; } Associate a connection with this client Note: the connection must have been created using the new operator
+
+
+[endsect]
+
+
+
+[section:write_some common::basic_client::write_some]
+
+[indexterm2 write_some..common::basic_client] Write some data to the client.
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ const ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_ common::basic_client< connections::shareable_tcp, Protocol >]
+
+A client that uses a TCP socket that owned by it.
+
+ template<
+ typename Protocol >
+ class basic_client< connections::shareable_tcp, Protocol >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.connection_ptr [*connection_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.header_buffer_type [*header_buffer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.io_service_type [*io_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.role_type [*role_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.async_read_some [*async_read_some]]]
+ [Asynchronously read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.async_write_some [*async_write_some]]]
+ [Asynchronously write some data to the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.basic_client [*basic_client]]]
+ [Construct. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.bytes_left [*bytes_left]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.connection [*connection]]]
+ [Get a shared_ptr of the connection associated with the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.construct [*construct]]]
+ [Construct the client by claiming a request id. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.keep_connection [*keep_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.read_some [*read_some]]]
+ [Read data into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.set_connection [*set_connection]]]
+ [Associate a connection with this client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.status [*status]]]
+ [Set the status of the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.write_some [*write_some]]]
+ [Write some data to the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_._basic_client [*~basic_client]]]
+ [Destroy. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.bytes_left_ [*bytes_left_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.connection_ [*connection_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.header_ [*header_]]]
+ [Buffer used to check the header of each packet. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.keep_connection_ [*keep_connection_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.outbuf_ [*outbuf_]]]
+ [Output buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.request_id_ [*request_id_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.role_ [*role_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.status_ [*status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.total_sent_bytes_ [*total_sent_bytes_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.total_sent_packets_ [*total_sent_packets_]]]
+ []
+ ]
+
+]
+
+
+[section:async_read_some common::basic_client< connections::shareable_tcp, Protocol >::async_read_some]
+
+[indexterm2 async_read_some..common::basic_client< connections::shareable_tcp, Protocol >] Asynchronously read some data from the client.
+
+ template<
+ typename MutableBufferSequence ,
+ typename Handler >
+ void async_read_some(
+ const MutableBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some common::basic_client< connections::shareable_tcp, Protocol >::async_write_some]
+
+[indexterm2 async_write_some..common::basic_client< connections::shareable_tcp, Protocol >] Asynchronously write some data to the client.
+
+ template<
+ typename ConstBufferSequence ,
+ typename Handler >
+ void async_write_some(
+ const ConstBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+[section:basic_client common::basic_client< connections::shareable_tcp, Protocol >::basic_client]
+
+[indexterm2 basic_client..common::basic_client< connections::shareable_tcp, Protocol >] Construct.
+
+ ``[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.basic_client.overload1 basic_client]``(
+ io_service_type & ios);
+
+ ``[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.basic_client.overload2 basic_client]``();
+
+
+[section:overload1 common::basic_client< connections::shareable_tcp, Protocol >::basic_client (1 of 2 overloads)]
+
+Construct.
+
+ basic_client(
+ io_service_type & ios);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_client< connections::shareable_tcp, Protocol >::basic_client (2 of 2 overloads)]
+
+Construct.
+
+ basic_client();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:bytes_left common::basic_client< connections::shareable_tcp, Protocol >::bytes_left]
+
+[indexterm2 bytes_left..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ std::size_t & bytes_left();
+
+
+
+[endsect]
+
+
+
+[section:bytes_left_ common::basic_client< connections::shareable_tcp, Protocol >::bytes_left_]
+
+[indexterm2 bytes_left_..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ std::size_t bytes_left_;
+
+
+
+[endsect]
+
+
+[section:close common::basic_client< connections::shareable_tcp, Protocol >::close]
+
+[indexterm2 close..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ boost::system::error_code ``[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.close.overload1 close]``(
+ boost::uint64_t app_status,
+ boost::system::error_code & ec);
+
+ void ``[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.close.overload2 close]``(
+ boost::uint64_t app_status = 0);
+
+
+[section:overload1 common::basic_client< connections::shareable_tcp, Protocol >::close (1 of 2 overloads)]
+
+
+
+ boost::system::error_code close(
+ boost::uint64_t app_status,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_client< connections::shareable_tcp, Protocol >::close (2 of 2 overloads)]
+
+
+
+ void close(
+ boost::uint64_t app_status = 0);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:connection common::basic_client< connections::shareable_tcp, Protocol >::connection]
+
+[indexterm2 connection..common::basic_client< connections::shareable_tcp, Protocol >] Get a shared_ptr of the connection associated with the client.
+
+ connection_type::pointer & connection();
+
+
+
+[endsect]
+
+
+
+[section:connection_ common::basic_client< connections::shareable_tcp, Protocol >::connection_]
+
+[indexterm2 connection_..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ connection_ptr connection_;
+
+
+
+[endsect]
+
+
+
+[section:connection_ptr common::basic_client< connections::shareable_tcp, Protocol >::connection_ptr]
+
+[indexterm2 connection_ptr..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ typedef connection_type::pointer connection_ptr;
+
+
+
+
+[endsect]
+
+
+
+[section:connection_type common::basic_client< connections::shareable_tcp, Protocol >::connection_type]
+
+[indexterm2 connection_type..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ typedef connections::shareable_tcp connection_type;
+
+
+
+
+[endsect]
+
+
+
+[section:construct common::basic_client< connections::shareable_tcp, Protocol >::construct]
+
+[indexterm2 construct..common::basic_client< connections::shareable_tcp, Protocol >] Construct the client by claiming a request id.
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code construct(
+ RequestImpl & req,
+ boost::system::error_code & ec);
+
+
+Before loading a request, it will usually not have a request id. This function reads headers (and corresponding bodies if necessary) until a BEGIN\_REQUEST record is found. The calling request then claims and serves that request.
+
+
+[endsect]
+
+
+
+[section:header_ common::basic_client< connections::shareable_tcp, Protocol >::header_]
+
+[indexterm2 header_..common::basic_client< connections::shareable_tcp, Protocol >] Buffer used to check the header of each packet.
+
+ fcgi::spec::header header_;
+
+
+
+[endsect]
+
+
+
+[section:header_buffer_type common::basic_client< connections::shareable_tcp, Protocol >::header_buffer_type]
+
+[indexterm2 header_buffer_type..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ typedef boost::array< unsigned char, fcgi::spec::header_length::value > header_buffer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:io_service_type common::basic_client< connections::shareable_tcp, Protocol >::io_service_type]
+
+[indexterm2 io_service_type..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ typedef ::cgi::common::io_service io_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:is_open common::basic_client< connections::shareable_tcp, Protocol >::is_open]
+
+[indexterm2 is_open..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ bool is_open() const;
+
+
+
+[endsect]
+
+
+
+[section:keep_connection common::basic_client< connections::shareable_tcp, Protocol >::keep_connection]
+
+[indexterm2 keep_connection..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ bool keep_connection() const;
+
+
+
+[endsect]
+
+
+
+[section:keep_connection_ common::basic_client< connections::shareable_tcp, Protocol >::keep_connection_]
+
+[indexterm2 keep_connection_..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ bool keep_connection_;
+
+
+
+[endsect]
+
+
+
+[section:map_type common::basic_client< connections::shareable_tcp, Protocol >::map_type]
+
+[indexterm2 map_type..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ typedef ::cgi::common::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:mutable_buffers_type common::basic_client< connections::shareable_tcp, Protocol >::mutable_buffers_type]
+
+[indexterm2 mutable_buffers_type..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ typedef boost::asio::mutable_buffers_1 mutable_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:outbuf_ common::basic_client< connections::shareable_tcp, Protocol >::outbuf_]
+
+[indexterm2 outbuf_..common::basic_client< connections::shareable_tcp, Protocol >] Output buffer.
+
+ std::vector< boost::asio::const_buffer > outbuf_;
+
+
+
+[endsect]
+
+
+
+[section:protocol_type common::basic_client< connections::shareable_tcp, Protocol >::protocol_type]
+
+[indexterm2 protocol_type..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ typedef Protocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:read_some common::basic_client< connections::shareable_tcp, Protocol >::read_some]
+
+[indexterm2 read_some..common::basic_client< connections::shareable_tcp, Protocol >] Read data into the supplied buffer.
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+Reads some data that, correctly checking and stripping FastCGI headers.
+
+Returns the number of bytes read and sets `ec` such that `ec` evaluates to `true` iff an error occured during the read operation.
+
+Notable errors:
+* `fcgierror::data_for_another_request`
+
+* `fcgierror::connection_locked`
+
+
+These must be dealt with by user code if they choose to read through the client (reading through the request is recommended).
+
+
+[endsect]
+
+
+
+[section:request_id common::basic_client< connections::shareable_tcp, Protocol >::request_id]
+
+[indexterm2 request_id..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ boost::uint16_t const & request_id() const;
+
+
+
+[endsect]
+
+
+
+[section:request_id_ common::basic_client< connections::shareable_tcp, Protocol >::request_id_]
+
+[indexterm2 request_id_..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ boost::uint16_t request_id_;
+
+
+
+[endsect]
+
+
+
+[section:role_ common::basic_client< connections::shareable_tcp, Protocol >::role_]
+
+[indexterm2 role_..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ role_type role_;
+
+
+
+[endsect]
+
+
+
+[section:role_type common::basic_client< connections::shareable_tcp, Protocol >::role_type]
+
+[indexterm2 role_type..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ typedef fcgi::spec_detail::role_types role_type;
+
+
+
+
+[endsect]
+
+
+[section:set_connection common::basic_client< connections::shareable_tcp, Protocol >::set_connection]
+
+[indexterm2 set_connection..common::basic_client< connections::shareable_tcp, Protocol >] Associate a connection with this client.
+
+ bool ``[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.set_connection.overload1 set_connection]``(
+ const connection_type::pointer & conn);
+
+ bool ``[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.set_connection.overload2 set_connection]``(
+ connection_type * conn);
+
+
+[section:overload1 common::basic_client< connections::shareable_tcp, Protocol >::set_connection (1 of 2 overloads)]
+
+Associate a connection with this client.
+
+ bool set_connection(
+ const connection_type::pointer & conn);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_client< connections::shareable_tcp, Protocol >::set_connection (2 of 2 overloads)]
+
+Associate a connection with this client.
+
+ bool set_connection(
+ connection_type * conn);
+
+
+Note: the connection must have been created using the new operator
+
+
+[endsect]
+
+
+[endsect]
+
+[section:status common::basic_client< connections::shareable_tcp, Protocol >::status]
+
+[indexterm2 status..common::basic_client< connections::shareable_tcp, Protocol >] Set the status of the client.
+
+ void ``[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.status.overload1 status]``(
+ client_status status);
+
+ const client_status & ``[link cgi.reference.common__basic_client_lt__connections__shareable_tcp,_Protocol__gt_.status.overload2 status]``() const;
+
+
+[section:overload1 common::basic_client< connections::shareable_tcp, Protocol >::status (1 of 2 overloads)]
+
+Set the status of the client.
+
+ void status(
+ client_status status);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_client< connections::shareable_tcp, Protocol >::status (2 of 2 overloads)]
+
+Get the status of the client.
+
+ const client_status & status() const;
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:status_ common::basic_client< connections::shareable_tcp, Protocol >::status_]
+
+[indexterm2 status_..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ client_status status_;
+
+
+
+[endsect]
+
+
+
+[section:total_sent_bytes_ common::basic_client< connections::shareable_tcp, Protocol >::total_sent_bytes_]
+
+[indexterm2 total_sent_bytes_..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ boost::uint64_t total_sent_bytes_;
+
+
+
+[endsect]
+
+
+
+[section:total_sent_packets_ common::basic_client< connections::shareable_tcp, Protocol >::total_sent_packets_]
+
+[indexterm2 total_sent_packets_..common::basic_client< connections::shareable_tcp, Protocol >]
+
+ boost::uint64_t total_sent_packets_;
+
+
+
+[endsect]
+
+
+
+[section:write_some common::basic_client< connections::shareable_tcp, Protocol >::write_some]
+
+[indexterm2 write_some..common::basic_client< connections::shareable_tcp, Protocol >] Write some data to the client.
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ const ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:_basic_client common::basic_client< connections::shareable_tcp, Protocol >::~basic_client]
+
+[indexterm2 ~basic_client..common::basic_client< connections::shareable_tcp, Protocol >] Destroy.
+
+ ~basic_client();
+
+
+Closing the connection as early as possible is good for efficiency
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_connection_lt__tags__async_stdio__gt_ common::basic_connection< tags::async_stdio >]
+
+
+
+ template<>
+ class basic_connection< tags::async_stdio > :
+ public common::basic_connection< tags::stdio >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.pointer [*pointer]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.async_read_some [*async_read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.async_write_some [*async_write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.basic_connection [*basic_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.create [*create]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.write_some [*write_some]]]
+ []
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.is_open_ [*is_open_]]]
+ []
+ ]
+
+]
+
+
+[section:async_read_some common::basic_connection< tags::async_stdio >::async_read_some]
+
+[indexterm2 async_read_some..common::basic_connection< tags::async_stdio >]
+
+ template<
+ typename MutableBufferSequence ,
+ typename Handler >
+ void async_read_some(
+ const MutableBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some common::basic_connection< tags::async_stdio >::async_write_some]
+
+[indexterm2 async_write_some..common::basic_connection< tags::async_stdio >]
+
+ template<
+ typename ConstBufferSequence ,
+ typename Handler >
+ void async_write_some(
+ const ConstBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:basic_connection common::basic_connection< tags::async_stdio >::basic_connection]
+
+[indexterm2 basic_connection..common::basic_connection< tags::async_stdio >]
+
+ basic_connection(
+ common::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:close common::basic_connection< tags::async_stdio >::close]
+
+[indexterm2 close..common::basic_connection< tags::async_stdio >]
+
+ void close();
+
+
+
+[endsect]
+
+
+[section:create common::basic_connection< tags::async_stdio >::create]
+
+[indexterm2 create..common::basic_connection< tags::async_stdio >]
+
+ static pointer ``[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.create.overload1 create]``();
+
+ static pointer ``[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.create.overload2 create]``(
+ ::cgi::common::io_service & ios);
+
+
+[section:overload1 common::basic_connection< tags::async_stdio >::create (1 of 2 overloads)]
+
+
+['Inherited from common::basic_connection< tags::stdio >.]
+
+
+
+ static pointer create();
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_connection< tags::async_stdio >::create (2 of 2 overloads)]
+
+
+
+ static pointer create(
+ ::cgi::common::io_service & ios);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:is_open common::basic_connection< tags::async_stdio >::is_open]
+
+[indexterm2 is_open..common::basic_connection< tags::async_stdio >]
+
+ bool is_open() const;
+
+
+
+[endsect]
+
+
+
+[section:is_open_ common::basic_connection< tags::async_stdio >::is_open_]
+
+
+['Inherited from common::basic_connection< tags::stdio >.]
+
+[indexterm2 is_open_..common::basic_connection< tags::async_stdio >]
+
+ bool is_open_;
+
+
+
+[endsect]
+
+
+
+[section:pointer common::basic_connection< tags::async_stdio >::pointer]
+
+[indexterm2 pointer..common::basic_connection< tags::async_stdio >]
+
+ typedef boost::shared_ptr< type > pointer;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.pointer [*pointer]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.async_read_some [*async_read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.async_write_some [*async_write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.basic_connection [*basic_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.create [*create]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.write_some [*write_some]]]
+ []
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__async_stdio__gt_.is_open_ [*is_open_]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:read_some common::basic_connection< tags::async_stdio >::read_some]
+
+
+['Inherited from common::basic_connection< tags::stdio >.]
+
+[indexterm2 read_some..common::basic_connection< tags::async_stdio >]
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ MutableBufferSequence buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:type common::basic_connection< tags::async_stdio >::type]
+
+[indexterm2 type..common::basic_connection< tags::async_stdio >]
+
+ typedef basic_connection< tags::async_stdio > type;
+
+
+
+
+[endsect]
+
+
+
+[section:write_some common::basic_connection< tags::async_stdio >::write_some]
+
+
+['Inherited from common::basic_connection< tags::stdio >.]
+
+[indexterm2 write_some..common::basic_connection< tags::async_stdio >]
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_connection_lt__tags__shareable_tcp_socket__gt_ common::basic_connection< tags::shareable_tcp_socket >]
+
+
+
+ template<>
+ class basic_connection< tags::shareable_tcp_socket > :
+ public connection_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt___condition_type [*basic_connection< tags::shareable_tcp_socket >::condition_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.mutex_type [*mutex_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.next_layer_type [*next_layer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.pointer [*pointer]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.request_map_type [*request_map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.request_vector_type [*request_vector_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.scoped_lock_type [*scoped_lock_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.add_request [*add_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.async_read_some [*async_read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.async_write_some [*async_write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.basic_connection [*basic_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.condition [*condition]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.create [*create]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.get_slot [*get_slot]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.lock [*lock]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.mutex [*mutex]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.next_layer [*next_layer]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.unlock [*unlock]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.wait [*wait]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.write_some [*write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_._basic_connection [*~basic_connection]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.deletable_request_ids_ [*deletable_request_ids_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.request_map_ [*request_map_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.requests_ [*requests_]]]
+ []
+ ]
+
+]
+
+
+[section:add_request common::basic_connection< tags::shareable_tcp_socket >::add_request]
+
+[indexterm2 add_request..common::basic_connection< tags::shareable_tcp_socket >]
+
+ boost::system::error_code add_request(
+ boost::uint16_t id,
+ request_type * req,
+ bool on_heap,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:async_read_some common::basic_connection< tags::shareable_tcp_socket >::async_read_some]
+
+[indexterm2 async_read_some..common::basic_connection< tags::shareable_tcp_socket >]
+
+ template<
+ typename MutableBufferSequence ,
+ typename Handler >
+ void async_read_some(
+ MutableBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some common::basic_connection< tags::shareable_tcp_socket >::async_write_some]
+
+[indexterm2 async_write_some..common::basic_connection< tags::shareable_tcp_socket >]
+
+ template<
+ typename ConstBufferSequence ,
+ typename Handler >
+ void async_write_some(
+ ConstBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:basic_connection common::basic_connection< tags::shareable_tcp_socket >::basic_connection]
+
+[indexterm2 basic_connection..common::basic_connection< tags::shareable_tcp_socket >]
+
+ basic_connection(
+ io_service & ios);
+
+
+End FastCGI stuff
+
+
+[endsect]
+
+
+
+[section:close common::basic_connection< tags::shareable_tcp_socket >::close]
+
+[indexterm2 close..common::basic_connection< tags::shareable_tcp_socket >]
+
+ void close();
+
+
+
+[endsect]
+
+
+
+[section:condition common::basic_connection< tags::shareable_tcp_socket >::condition]
+
+[indexterm2 condition..common::basic_connection< tags::shareable_tcp_socket >]
+
+ condition_type & condition();
+
+
+
+[endsect]
+
+
+
+[section:create common::basic_connection< tags::shareable_tcp_socket >::create]
+
+[indexterm2 create..common::basic_connection< tags::shareable_tcp_socket >]
+
+ static pointer create(
+ io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:deletable_request_ids_ common::basic_connection< tags::shareable_tcp_socket >::deletable_request_ids_]
+
+[indexterm2 deletable_request_ids_..common::basic_connection< tags::shareable_tcp_socket >]
+
+ std::set< int > deletable_request_ids_;
+
+
+
+[endsect]
+
+
+
+[section:get_slot common::basic_connection< tags::shareable_tcp_socket >::get_slot]
+
+[indexterm2 get_slot..common::basic_connection< tags::shareable_tcp_socket >]
+
+ boost::system::error_code get_slot(
+ boost::uint16_t id,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:is_open common::basic_connection< tags::shareable_tcp_socket >::is_open]
+
+[indexterm2 is_open..common::basic_connection< tags::shareable_tcp_socket >]
+
+ bool is_open() const;
+
+
+
+[endsect]
+
+
+
+[section:lock common::basic_connection< tags::shareable_tcp_socket >::lock]
+
+[indexterm2 lock..common::basic_connection< tags::shareable_tcp_socket >]
+
+ void lock();
+
+
+
+[endsect]
+
+
+
+[section:mutex common::basic_connection< tags::shareable_tcp_socket >::mutex]
+
+[indexterm2 mutex..common::basic_connection< tags::shareable_tcp_socket >]
+
+ mutex_type & mutex();
+
+
+
+[endsect]
+
+
+
+[section:mutex_type common::basic_connection< tags::shareable_tcp_socket >::mutex_type]
+
+[indexterm2 mutex_type..common::basic_connection< tags::shareable_tcp_socket >]
+
+ typedef boost::mutex mutex_type;
+
+
+
+
+[endsect]
+
+
+
+[section:next_layer common::basic_connection< tags::shareable_tcp_socket >::next_layer]
+
+[indexterm2 next_layer..common::basic_connection< tags::shareable_tcp_socket >]
+
+ next_layer_type & next_layer();
+
+
+
+[endsect]
+
+
+
+[section:next_layer_type common::basic_connection< tags::shareable_tcp_socket >::next_layer_type]
+
+[indexterm2 next_layer_type..common::basic_connection< tags::shareable_tcp_socket >]
+
+ typedef boost::asio::ip::tcp::socket next_layer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:pointer common::basic_connection< tags::shareable_tcp_socket >::pointer]
+
+[indexterm2 pointer..common::basic_connection< tags::shareable_tcp_socket >]
+
+ typedef boost::shared_ptr< basic_connection< tags::shareable_tcp_socket > > pointer;
+
+
+
+
+[endsect]
+
+
+[section:read_some common::basic_connection< tags::shareable_tcp_socket >::read_some]
+
+[indexterm2 read_some..common::basic_connection< tags::shareable_tcp_socket >]
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.read_some.overload1 read_some]``(
+ MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.read_some.overload2 read_some]``(
+ MutableBufferSequence & buf);
+
+
+[section:overload1 common::basic_connection< tags::shareable_tcp_socket >::read_some (1 of 2 overloads)]
+
+
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_connection< tags::shareable_tcp_socket >::read_some (2 of 2 overloads)]
+
+
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ MutableBufferSequence & buf);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:request_map_ common::basic_connection< tags::shareable_tcp_socket >::request_map_]
+
+[indexterm2 request_map_..common::basic_connection< tags::shareable_tcp_socket >]
+
+ request_map_type request_map_;
+
+
+FastCGI specific stuff
+
+
+[endsect]
+
+
+
+[section:request_map_type common::basic_connection< tags::shareable_tcp_socket >::request_map_type]
+
+[indexterm2 request_map_type..common::basic_connection< tags::shareable_tcp_socket >]
+
+ typedef std::map< boost::uint16_t, request_type * > request_map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_ptr common::basic_connection< tags::shareable_tcp_socket >::request_ptr]
+
+[indexterm2 request_ptr..common::basic_connection< tags::shareable_tcp_socket >]
+
+ typedef detail::protocol_traits< fcgi_ >::request_ptr request_ptr;
+
+
+
+
+[endsect]
+
+
+
+[section:request_type common::basic_connection< tags::shareable_tcp_socket >::request_type]
+
+[indexterm2 request_type..common::basic_connection< tags::shareable_tcp_socket >]
+
+ typedef detail::protocol_traits< fcgi_ >::request_type request_type;
+
+
+
+FastCGI specific stuff
+
+
+[endsect]
+
+
+
+[section:request_vector_type common::basic_connection< tags::shareable_tcp_socket >::request_vector_type]
+
+[indexterm2 request_vector_type..common::basic_connection< tags::shareable_tcp_socket >]
+
+ typedef std::vector< request_type * > request_vector_type;
+
+
+
+
+[endsect]
+
+
+
+[section:requests_ common::basic_connection< tags::shareable_tcp_socket >::requests_]
+
+[indexterm2 requests_..common::basic_connection< tags::shareable_tcp_socket >]
+
+ request_vector_type requests_;
+
+
+
+[endsect]
+
+
+
+[section:scoped_lock_type common::basic_connection< tags::shareable_tcp_socket >::scoped_lock_type]
+
+[indexterm2 scoped_lock_type..common::basic_connection< tags::shareable_tcp_socket >]
+
+ typedef boost::mutex::scoped_lock scoped_lock_type;
+
+
+
+
+[endsect]
+
+
+
+[section:unlock common::basic_connection< tags::shareable_tcp_socket >::unlock]
+
+[indexterm2 unlock..common::basic_connection< tags::shareable_tcp_socket >]
+
+ void unlock();
+
+
+
+[endsect]
+
+
+
+[section:wait common::basic_connection< tags::shareable_tcp_socket >::wait]
+
+[indexterm2 wait..common::basic_connection< tags::shareable_tcp_socket >]
+
+ void wait();
+
+
+
+[endsect]
+
+
+[section:write_some common::basic_connection< tags::shareable_tcp_socket >::write_some]
+
+[indexterm2 write_some..common::basic_connection< tags::shareable_tcp_socket >]
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.write_some.overload1 write_some]``(
+ ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt_.write_some.overload2 write_some]``(
+ ConstBufferSequence & buf);
+
+
+[section:overload1 common::basic_connection< tags::shareable_tcp_socket >::write_some (1 of 2 overloads)]
+
+
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_connection< tags::shareable_tcp_socket >::write_some (2 of 2 overloads)]
+
+
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ ConstBufferSequence & buf);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:_basic_connection common::basic_connection< tags::shareable_tcp_socket >::~basic_connection]
+
+[indexterm2 ~basic_connection..common::basic_connection< tags::shareable_tcp_socket >]
+
+ ~basic_connection();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_connection_lt__tags__shareable_tcp_socket__gt___condition_type common::basic_connection< tags::shareable_tcp_socket >::condition_type]
+
+
+
+ struct basic_connection< tags::shareable_tcp_socket >::condition_type
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__shareable_tcp_socket__gt___condition_type.pointer [*pointer]]]
+ []
+
+ ]
+
+]
+
+
+[section:pointer common::basic_connection< tags::shareable_tcp_socket >::condition_type::pointer]
+
+[indexterm2 pointer..common::basic_connection< tags::shareable_tcp_socket >::condition_type]
+
+ typedef boost::shared_ptr< boost::condition_variable > pointer;
+
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_connection_lt__tags__stderr__gt_ common::basic_connection< tags::stderr >]
+
+
+
+ template<>
+ class basic_connection< tags::stderr > :
+ public connection_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.pointer [*pointer]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.async_read_some [*async_read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.async_write_some [*async_write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.basic_connection [*basic_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.create [*create]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.next_layer [*next_layer]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.write_some [*write_some]]]
+ []
+ ]
+
+]
+
+
+[section:async_read_some common::basic_connection< tags::stderr >::async_read_some]
+
+[indexterm2 async_read_some..common::basic_connection< tags::stderr >]
+
+ template<
+ typename MutableBufferSequence ,
+ typename Handler >
+ void async_read_some(
+ MutableBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some common::basic_connection< tags::stderr >::async_write_some]
+
+[indexterm2 async_write_some..common::basic_connection< tags::stderr >]
+
+ template<
+ typename ConstBufferSequence ,
+ typename Handler >
+ void async_write_some(
+ ConstBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:basic_connection common::basic_connection< tags::stderr >::basic_connection]
+
+[indexterm2 basic_connection..common::basic_connection< tags::stderr >]
+
+ basic_connection(
+ io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:close common::basic_connection< tags::stderr >::close]
+
+[indexterm2 close..common::basic_connection< tags::stderr >]
+
+ void close();
+
+
+
+[endsect]
+
+
+
+[section:create common::basic_connection< tags::stderr >::create]
+
+[indexterm2 create..common::basic_connection< tags::stderr >]
+
+ static pointer create(
+ io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:is_open common::basic_connection< tags::stderr >::is_open]
+
+[indexterm2 is_open..common::basic_connection< tags::stderr >]
+
+ bool is_open() const;
+
+
+
+[endsect]
+
+
+
+[section:next_layer common::basic_connection< tags::stderr >::next_layer]
+
+[indexterm2 next_layer..common::basic_connection< tags::stderr >]
+
+ next_layer_type & next_layer();
+
+
+
+[endsect]
+
+
+
+[section:pointer common::basic_connection< tags::stderr >::pointer]
+
+[indexterm2 pointer..common::basic_connection< tags::stderr >]
+
+ typedef boost::shared_ptr< type > pointer;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.pointer [*pointer]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.async_read_some [*async_read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.async_write_some [*async_write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.basic_connection [*basic_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.create [*create]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.next_layer [*next_layer]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.write_some [*write_some]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:read_some common::basic_connection< tags::stderr >::read_some]
+
+[indexterm2 read_some..common::basic_connection< tags::stderr >]
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.read_some.overload1 read_some]``(
+ MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.read_some.overload2 read_some]``(
+ MutableBufferSequence & buf);
+
+
+[section:overload1 common::basic_connection< tags::stderr >::read_some (1 of 2 overloads)]
+
+
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_connection< tags::stderr >::read_some (2 of 2 overloads)]
+
+
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ MutableBufferSequence & buf);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:type common::basic_connection< tags::stderr >::type]
+
+[indexterm2 type..common::basic_connection< tags::stderr >]
+
+ typedef basic_connection< tags::stderr > type;
+
+
+
+
+[endsect]
+
+
+[section:write_some common::basic_connection< tags::stderr >::write_some]
+
+[indexterm2 write_some..common::basic_connection< tags::stderr >]
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.write_some.overload1 write_some]``(
+ ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__stderr__gt_.write_some.overload2 write_some]``(
+ ConstBufferSequence & buf);
+
+
+[section:overload1 common::basic_connection< tags::stderr >::write_some (1 of 2 overloads)]
+
+
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_connection< tags::stderr >::write_some (2 of 2 overloads)]
+
+
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ ConstBufferSequence & buf);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:common__basic_connection_lt__tags__stdio__gt_ common::basic_connection< tags::stdio >]
+
+
+
+ template<>
+ class basic_connection< tags::stdio > :
+ public connection_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.pointer [*pointer]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.basic_connection [*basic_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.create [*create]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.write_some [*write_some]]]
+ []
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.is_open_ [*is_open_]]]
+ []
+ ]
+
+]
+
+[section:basic_connection common::basic_connection< tags::stdio >::basic_connection]
+
+[indexterm2 basic_connection..common::basic_connection< tags::stdio >]
+
+ template<
+ typename T >
+ ``[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.basic_connection.overload1 basic_connection]``(
+ T & );
+
+ ``[link cgi.reference.common__basic_connection_lt__tags__stdio__gt_.basic_connection.overload2 basic_connection]``();
+
+
+[section:overload1 common::basic_connection< tags::stdio >::basic_connection (1 of 2 overloads)]
+
+
+
+ template<
+ typename T >
+ basic_connection(
+ T & );
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_connection< tags::stdio >::basic_connection (2 of 2 overloads)]
+
+
+
+ basic_connection();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:close common::basic_connection< tags::stdio >::close]
+
+[indexterm2 close..common::basic_connection< tags::stdio >]
+
+ void close();
+
+
+
+[endsect]
+
+
+
+[section:create common::basic_connection< tags::stdio >::create]
+
+[indexterm2 create..common::basic_connection< tags::stdio >]
+
+ static pointer create();
+
+
+
+[endsect]
+
+
+
+[section:is_open common::basic_connection< tags::stdio >::is_open]
+
+[indexterm2 is_open..common::basic_connection< tags::stdio >]
+
+ bool is_open() const;
+
+
+
+[endsect]
+
+
+
+[section:is_open_ common::basic_connection< tags::stdio >::is_open_]
+
+[indexterm2 is_open_..common::basic_connection< tags::stdio >]
+
+ bool is_open_;
+
+
+
+[endsect]
+
+
+
+[section:pointer common::basic_connection< tags::stdio >::pointer]
+
+[indexterm2 pointer..common::basic_connection< tags::stdio >]
+
+ typedef boost::shared_ptr< basic_connection< tags::stdio > > pointer;
+
+
+
+
+[endsect]
+
+
+
+[section:read_some common::basic_connection< tags::stdio >::read_some]
+
+[indexterm2 read_some..common::basic_connection< tags::stdio >]
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ MutableBufferSequence buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:write_some common::basic_connection< tags::stdio >::write_some]
+
+[indexterm2 write_some..common::basic_connection< tags::stdio >]
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_connection_lt__tags__tcp_socket__gt_ common::basic_connection< tags::tcp_socket >]
+
+
+
+ template<>
+ class basic_connection< tags::tcp_socket > :
+ public connection_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.next_layer_type [*next_layer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.pointer [*pointer]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.async_read_some [*async_read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.async_write_some [*async_write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.basic_connection [*basic_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.create [*create]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.next_layer [*next_layer]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.write_some [*write_some]]]
+ []
+ ]
+
+]
+
+
+[section:async_read_some common::basic_connection< tags::tcp_socket >::async_read_some]
+
+[indexterm2 async_read_some..common::basic_connection< tags::tcp_socket >]
+
+ template<
+ typename MutableBufferSequence ,
+ typename Handler >
+ void async_read_some(
+ MutableBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:async_write_some common::basic_connection< tags::tcp_socket >::async_write_some]
+
+[indexterm2 async_write_some..common::basic_connection< tags::tcp_socket >]
+
+ template<
+ typename ConstBufferSequence ,
+ typename Handler >
+ void async_write_some(
+ ConstBufferSequence & buf,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:basic_connection common::basic_connection< tags::tcp_socket >::basic_connection]
+
+[indexterm2 basic_connection..common::basic_connection< tags::tcp_socket >]
+
+ basic_connection(
+ io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:close common::basic_connection< tags::tcp_socket >::close]
+
+[indexterm2 close..common::basic_connection< tags::tcp_socket >]
+
+ void close();
+
+
+
+[endsect]
+
+
+
+[section:create common::basic_connection< tags::tcp_socket >::create]
+
+[indexterm2 create..common::basic_connection< tags::tcp_socket >]
+
+ static pointer create(
+ io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:is_open common::basic_connection< tags::tcp_socket >::is_open]
+
+[indexterm2 is_open..common::basic_connection< tags::tcp_socket >]
+
+ bool is_open() const;
+
+
+
+[endsect]
+
+
+
+[section:next_layer common::basic_connection< tags::tcp_socket >::next_layer]
+
+[indexterm2 next_layer..common::basic_connection< tags::tcp_socket >]
+
+ next_layer_type & next_layer();
+
+
+
+[endsect]
+
+
+
+[section:next_layer_type common::basic_connection< tags::tcp_socket >::next_layer_type]
+
+[indexterm2 next_layer_type..common::basic_connection< tags::tcp_socket >]
+
+ typedef boost::asio::ip::tcp::socket next_layer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:pointer common::basic_connection< tags::tcp_socket >::pointer]
+
+[indexterm2 pointer..common::basic_connection< tags::tcp_socket >]
+
+ typedef boost::shared_ptr< type > pointer;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.next_layer_type [*next_layer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.pointer [*pointer]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.async_read_some [*async_read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.async_write_some [*async_write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.basic_connection [*basic_connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.create [*create]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.next_layer [*next_layer]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.write_some [*write_some]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:read_some common::basic_connection< tags::tcp_socket >::read_some]
+
+[indexterm2 read_some..common::basic_connection< tags::tcp_socket >]
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.read_some.overload1 read_some]``(
+ MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.read_some.overload2 read_some]``(
+ MutableBufferSequence & buf);
+
+
+[section:overload1 common::basic_connection< tags::tcp_socket >::read_some (1 of 2 overloads)]
+
+
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_connection< tags::tcp_socket >::read_some (2 of 2 overloads)]
+
+
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ MutableBufferSequence & buf);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:type common::basic_connection< tags::tcp_socket >::type]
+
+[indexterm2 type..common::basic_connection< tags::tcp_socket >]
+
+ typedef basic_connection< tags::tcp_socket > type;
+
+
+
+
+[endsect]
+
+
+[section:write_some common::basic_connection< tags::tcp_socket >::write_some]
+
+[indexterm2 write_some..common::basic_connection< tags::tcp_socket >]
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.write_some.overload1 write_some]``(
+ ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_connection_lt__tags__tcp_socket__gt_.write_some.overload2 write_some]``(
+ ConstBufferSequence & buf);
+
+
+[section:overload1 common::basic_connection< tags::tcp_socket >::write_some (1 of 2 overloads)]
+
+
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_connection< tags::tcp_socket >::write_some (2 of 2 overloads)]
+
+
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ ConstBufferSequence & buf);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[endsect]
+
+[section:common__basic_cookie common::basic_cookie]
+
+A `basic_cookie<>` object that can be (out-) streamed.
+
+ template<
+ typename ``[link cgi.reference.CharT CharT]``>
+ struct basic_cookie
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_cookie.char_type [*char_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_cookie.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_cookie.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_cookie.basic_cookie [*basic_cookie]]]
+ [Create a cookie. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.to_string [*to_string]]]
+ [Create a cookie from a const char*. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_cookie.domain [*domain]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.expires [*expires]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.http_only [*http_only]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.name [*name]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.path [*path]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.secure [*secure]]]
+ [`true` iff the cookie is only used for secure connections. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.value [*value]]]
+ []
+ ]
+
+]
+
+Either set the parameters in the constructor, or set them directly. Note: If you want to set the parameters individually, remember that each parameter must NOT have a trailing semi-colon!
+
+TODO
+* Data should be URL-encoded, or maybe provide an overload for url_decode that takes an HttpCookie?
+
+* Add from_string() ?
+
+
+[section:basic_cookie common::basic_cookie::basic_cookie]
+
+[indexterm2 basic_cookie..common::basic_cookie] Create a cookie.
+
+ ``[link cgi.reference.common__basic_cookie.basic_cookie.overload1 basic_cookie]``(
+ const string_type & _name,
+ const string_type & _val,
+ const string_type & _expires = "",
+ const string_type & _path = "/",
+ const string_type & _domain = "",
+ bool _secure = false,
+ bool HttpOnly = false);
+
+ ``[link cgi.reference.common__basic_cookie.basic_cookie.overload2 basic_cookie]``(
+ const string_type & _name);
+
+ ``[link cgi.reference.common__basic_cookie.basic_cookie.overload3 basic_cookie]``();
+
+
+[section:overload1 common::basic_cookie::basic_cookie (1 of 3 overloads)]
+
+Create a cookie.
+
+ basic_cookie(
+ const string_type & _name,
+ const string_type & _val,
+ const string_type & _expires = "",
+ const string_type & _path = "/",
+ const string_type & _domain = "",
+ bool _secure = false,
+ bool HttpOnly = false);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_cookie::basic_cookie (2 of 3 overloads)]
+
+Create a cookie for deleting the cookie named `_name`.
+
+ basic_cookie(
+ const string_type & _name);
+
+
+
+[endsect]
+
+
+
+[section:overload3 common::basic_cookie::basic_cookie (3 of 3 overloads)]
+
+
+
+ basic_cookie();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:char_type common::basic_cookie::char_type]
+
+[indexterm2 char_type..common::basic_cookie]
+
+ typedef CharT char_type;
+
+
+
+
+[endsect]
+
+
+
+[section:domain common::basic_cookie::domain]
+
+[indexterm2 domain..common::basic_cookie]
+
+ string_type domain;
+
+
+
+[endsect]
+
+
+
+[section:expires common::basic_cookie::expires]
+
+[indexterm2 expires..common::basic_cookie]
+
+ string_type expires;
+
+
+
+[endsect]
+
+
+
+[section:http_only common::basic_cookie::http_only]
+
+[indexterm2 http_only..common::basic_cookie]
+
+ bool http_only;
+
+
+
+[endsect]
+
+
+
+[section:name common::basic_cookie::name]
+
+[indexterm2 name..common::basic_cookie]
+
+ string_type name;
+
+
+
+[endsect]
+
+
+
+[section:path common::basic_cookie::path]
+
+[indexterm2 path..common::basic_cookie]
+
+ string_type path;
+
+
+
+[endsect]
+
+
+
+[section:secure common::basic_cookie::secure]
+
+[indexterm2 secure..common::basic_cookie] `true` iff the cookie is only used for secure connections.
+
+ bool secure;
+
+
+
+[endsect]
+
+
+
+[section:self_type common::basic_cookie::self_type]
+
+[indexterm2 self_type..common::basic_cookie]
+
+ typedef basic_cookie< CharT > self_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_cookie.char_type [*char_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_cookie.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_cookie.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_cookie.basic_cookie [*basic_cookie]]]
+ [Create a cookie. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.to_string [*to_string]]]
+ [Create a cookie from a const char*. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_cookie.domain [*domain]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.expires [*expires]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.http_only [*http_only]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.name [*name]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.path [*path]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.secure [*secure]]]
+ [`true` iff the cookie is only used for secure connections. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_cookie.value [*value]]]
+ []
+ ]
+
+]
+
+Either set the parameters in the constructor, or set them directly. Note: If you want to set the parameters individually, remember that each parameter must NOT have a trailing semi-colon!
+
+TODO
+* Data should be URL-encoded, or maybe provide an overload for url_decode that takes an HttpCookie?
+
+* Add from_string() ?
+
+
+
+
+[endsect]
+
+
+
+[section:string_type common::basic_cookie::string_type]
+
+[indexterm2 string_type..common::basic_cookie]
+
+ typedef std::basic_string< CharT > string_type;
+
+
+
+
+[endsect]
+
+
+
+[section:to_string common::basic_cookie::to_string]
+
+[indexterm2 to_string..common::basic_cookie] Create a cookie from a const char*.
+
+ string_type to_string() const;
+
+
+Rules taken from: http://wp.netscape.com/newsref/std/cookie\_spec.html
+
+Assumes:
+* Parts of the cookie are delimited by '; '. ie. if there is no space, or multiple spaces after the semi-colon, this function won't work... Make a string out of the cookie.
+
+
+
+[endsect]
+
+
+
+[section:value common::basic_cookie::value]
+
+[indexterm2 value..common::basic_cookie]
+
+ string_type value;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_header common::basic_header]
+
+
+
+ template<
+ typename ``[link cgi.reference.CharT CharT]``>
+ struct basic_header
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_header.char_type [*char_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_header.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_header.basic_header [*basic_header]]]
+ [Construct an header from a cookie. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_header.operator_string_type [*operator string_type]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_header.content [*content]]]
+ []
+ ]
+
+]
+
+[section:basic_header common::basic_header::basic_header]
+
+[indexterm2 basic_header..common::basic_header] Construct an header from a cookie.
+
+ ``[link cgi.reference.common__basic_header.basic_header.overload1 basic_header]``(
+ const basic_cookie< char_type > & ck);
+
+ ``[link cgi.reference.common__basic_header.basic_header.overload2 basic_header]``(
+ const string_type & name,
+ const string_type & val);
+
+ ``[link cgi.reference.common__basic_header.basic_header.overload3 basic_header]``(
+ const string_type & _content);
+
+ ``[link cgi.reference.common__basic_header.basic_header.overload4 basic_header]``();
+
+
+[section:overload1 common::basic_header::basic_header (1 of 4 overloads)]
+
+Construct an header from a cookie.
+
+ basic_header(
+ const basic_cookie< char_type > & ck);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_header::basic_header (2 of 4 overloads)]
+
+
+
+ basic_header(
+ const string_type & name,
+ const string_type & val);
+
+
+
+[endsect]
+
+
+
+[section:overload3 common::basic_header::basic_header (3 of 4 overloads)]
+
+
+
+ basic_header(
+ const string_type & _content);
+
+
+
+[endsect]
+
+
+
+[section:overload4 common::basic_header::basic_header (4 of 4 overloads)]
+
+
+
+ basic_header();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:char_type common::basic_header::char_type]
+
+[indexterm2 char_type..common::basic_header]
+
+ typedef CharT char_type;
+
+
+
+
+[endsect]
+
+
+
+[section:content common::basic_header::content]
+
+[indexterm2 content..common::basic_header]
+
+ string_type content;
+
+
+
+[endsect]
+
+
+
+[section:operator_string_type common::basic_header::operator string_type]
+
+[indexterm2 operator string_type..common::basic_header]
+
+ operator string_type();
+
+
+
+[endsect]
+
+
+
+[section:string_type common::basic_header::string_type]
+
+[indexterm2 string_type..common::basic_header]
+
+ typedef std::basic_string< CharT > string_type;
+
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_protocol_service common::basic_protocol_service]
+
+Basic Protocol Service.
+
+ template<
+ typename Protocol ,
+ typename IoServiceProvider >
+ class basic_protocol_service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.ios_provider_type [*ios_provider_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.queue_type [*queue_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.set_type [*set_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.traits [*traits]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.basic_protocol_service [*basic_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.dispatch [*dispatch]]]
+ [Dispatch a handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.io_service [*io_service]]]
+ [Return an available io_service from the IoServiceProvider. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.post [*post]]]
+ [Post the handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.reset [*reset]]]
+ [Reset all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.run [*run]]]
+ [Run all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.stop [*stop]]]
+ [Stop all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service._basic_protocol_service [*~basic_protocol_service]]]
+ []
+ ]
+
+]
+
+Holds the request queue and the connection queue. It is also a wrapper around asio::io\_service
+
+[section:basic_protocol_service common::basic_protocol_service::basic_protocol_service]
+
+[indexterm2 basic_protocol_service..common::basic_protocol_service]
+
+ ``[link cgi.reference.common__basic_protocol_service.basic_protocol_service.overload1 basic_protocol_service]``(
+ boost::asio::io_service & ios);
+
+ ``[link cgi.reference.common__basic_protocol_service.basic_protocol_service.overload2 basic_protocol_service]``(
+ int pool_size_hint = 1);
+
+
+[section:overload1 common::basic_protocol_service::basic_protocol_service (1 of 2 overloads)]
+
+
+
+ basic_protocol_service(
+ boost::asio::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_protocol_service::basic_protocol_service (2 of 2 overloads)]
+
+
+
+ basic_protocol_service(
+ int pool_size_hint = 1);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:dispatch common::basic_protocol_service::dispatch]
+
+[indexterm2 dispatch..common::basic_protocol_service] Dispatch a handler through an available io_service.
+
+ template<
+ typename Handler >
+ void dispatch(
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:io_service common::basic_protocol_service::io_service]
+
+[indexterm2 io_service..common::basic_protocol_service] Return an available io_service from the IoServiceProvider.
+
+ ::cgi::common::io_service & io_service();
+
+
+The order in which the underlying io\_services are returned is determined by what policy the IoServiceProvider uses.
+
+
+[endsect]
+
+
+
+[section:ios_provider_type common::basic_protocol_service::ios_provider_type]
+
+[indexterm2 ios_provider_type..common::basic_protocol_service]
+
+ typedef IoServiceProvider ios_provider_type;
+
+
+
+
+[endsect]
+
+
+
+[section:is_cgi common::basic_protocol_service::is_cgi]
+
+[indexterm2 is_cgi..common::basic_protocol_service]
+
+ bool is_cgi();
+
+
+
+[endsect]
+
+
+
+[section:post common::basic_protocol_service::post]
+
+[indexterm2 post..common::basic_protocol_service] Post the handler through an available io_service.
+
+ template<
+ typename Handler >
+ void post(
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type common::basic_protocol_service::protocol_type]
+
+[indexterm2 protocol_type..common::basic_protocol_service]
+
+ typedef Protocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:queue_type common::basic_protocol_service::queue_type]
+
+[indexterm2 queue_type..common::basic_protocol_service]
+
+ typedef std::queue< request_ptr > queue_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_ptr common::basic_protocol_service::request_ptr]
+
+[indexterm2 request_ptr..common::basic_protocol_service]
+
+ typedef boost::shared_ptr< request_type > request_ptr;
+
+
+
+
+[endsect]
+
+
+
+[section:request_type common::basic_protocol_service::request_type]
+
+[indexterm2 request_type..common::basic_protocol_service]
+
+ typedef traits::request_type request_type;
+
+
+
+
+[endsect]
+
+
+
+[section:reset common::basic_protocol_service::reset]
+
+[indexterm2 reset..common::basic_protocol_service] Reset all the io_services contained by this service.
+
+ void reset();
+
+
+This deletes the request queue(s), aborts all running requests and then calls reset() on each of the io\_services held by ios\_provider\_. There is no guarantee that requests will terminate immediately.
+
+
+[endsect]
+
+
+
+[section:run common::basic_protocol_service::run]
+
+[indexterm2 run..common::basic_protocol_service] Run all the io_services contained by this service.
+
+ void run();
+
+
+This is equivalent to calling run() on each of the io\_services held by ios\_provider\_
+
+
+[endsect]
+
+
+
+[section:set_type common::basic_protocol_service::set_type]
+
+[indexterm2 set_type..common::basic_protocol_service]
+
+ typedef std::set< request_ptr > set_type;
+
+
+
+
+[endsect]
+
+
+
+[section:stop common::basic_protocol_service::stop]
+
+[indexterm2 stop..common::basic_protocol_service] Stop all the io_services contained by this service.
+
+ void stop();
+
+
+This is equivalent to calling stop() on each of the io\_services held by ios\_provider\_
+
+
+[endsect]
+
+
+
+[section:traits common::basic_protocol_service::traits]
+
+[indexterm2 traits..common::basic_protocol_service]
+
+ typedef detail::protocol_traits< Protocol >::type traits;
+
+
+
+
+[endsect]
+
+
+
+[section:_basic_protocol_service common::basic_protocol_service::~basic_protocol_service]
+
+[indexterm2 ~basic_protocol_service..common::basic_protocol_service]
+
+ ~basic_protocol_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_request_acceptor common::basic_request_acceptor]
+
+The interface class for any *cgiacceptor.
+
+ template<
+ typename RequestAcceptorService >
+ class basic_request_acceptor
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.next_layer_type [*next_layer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.port_number_type [*port_number_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.service_type [*service_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.accept [*accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.assign [*assign]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.async_accept [*async_accept]]]
+ [Asynchronously accept one request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.basic_request_acceptor [*basic_request_acceptor]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.close [*close]]]
+ [Close the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.is_open [*is_open]]]
+ [Check if the acceptor is open. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.listen [*listen]]]
+ [Set the acceptor to listen. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.native [*native]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.open [*open]]]
+ [Open the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.protocol_service [*protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor._basic_request_acceptor [*~basic_request_acceptor]]]
+ []
+ ]
+
+]
+
+[section:accept common::basic_request_acceptor::accept]
+
+[indexterm2 accept..common::basic_request_acceptor]
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code ``[link cgi.reference.common__basic_request_acceptor.accept.overload1 accept]``(
+ CommonGatewayRequest & request,
+ endpoint_type & ep,
+ boost::system::error_code & ec);
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code ``[link cgi.reference.common__basic_request_acceptor.accept.overload2 accept]``(
+ CommonGatewayRequest & request,
+ boost::system::error_code & ec);
+
+ template<
+ typename CommonGatewayRequest >
+ void ``[link cgi.reference.common__basic_request_acceptor.accept.overload3 accept]``(
+ CommonGatewayRequest & request);
+
+
+[section:overload1 common::basic_request_acceptor::accept (1 of 3 overloads)]
+
+
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code accept(
+ CommonGatewayRequest & request,
+ endpoint_type & ep,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_request_acceptor::accept (2 of 3 overloads)]
+
+Accept one request.
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code accept(
+ CommonGatewayRequest & request,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload3 common::basic_request_acceptor::accept (3 of 3 overloads)]
+
+Accept one request.
+
+ template<
+ typename CommonGatewayRequest >
+ void accept(
+ CommonGatewayRequest & request);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:assign common::basic_request_acceptor::assign]
+
+[indexterm2 assign..common::basic_request_acceptor]
+
+ template<
+ typename Protocol >
+ boost::system::error_code ``[link cgi.reference.common__basic_request_acceptor.assign.overload1 assign]``(
+ Protocol protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
+
+ template<
+ typename Protocol >
+ void ``[link cgi.reference.common__basic_request_acceptor.assign.overload2 assign]``(
+ Protocol protocol,
+ const native_type & native_acceptor);
+
+
+[section:overload1 common::basic_request_acceptor::assign (1 of 2 overloads)]
+
+
+
+ template<
+ typename Protocol >
+ boost::system::error_code assign(
+ Protocol protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_request_acceptor::assign (2 of 2 overloads)]
+
+
+
+ template<
+ typename Protocol >
+ void assign(
+ Protocol protocol,
+ const native_type & native_acceptor);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:async_accept common::basic_request_acceptor::async_accept]
+
+[indexterm2 async_accept..common::basic_request_acceptor] Asynchronously accept one request.
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Handler >
+ void async_accept(
+ CommonGatewayRequest & request,
+ Handler handler);
+
+
+
+[endsect]
+
+
+[section:basic_request_acceptor common::basic_request_acceptor::basic_request_acceptor]
+
+[indexterm2 basic_request_acceptor..common::basic_request_acceptor]
+
+ template<
+ typename IoServiceProvider ,
+ typename InternetProtocol >
+ ``[link cgi.reference.common__basic_request_acceptor.basic_request_acceptor.overload1 basic_request_acceptor]``(
+ common::basic_protocol_service< protocol_type, IoServiceProvider > & ps,
+ const InternetProtocol & ip,
+ const native_type & native_acceptor);
+
+ template<
+ typename IoServiceProvider ,
+ typename InternetProtocol >
+ ``[link cgi.reference.common__basic_request_acceptor.basic_request_acceptor.overload2 basic_request_acceptor]``(
+ common::basic_protocol_service< protocol_type, IoServiceProvider > & ps,
+ const boost::asio::ip::basic_endpoint< InternetProtocol > & endpoint,
+ bool reuse_addr = true);
+
+ template<
+ typename IoServiceProvider >
+ ``[link cgi.reference.common__basic_request_acceptor.basic_request_acceptor.overload3 basic_request_acceptor]``(
+ common::basic_protocol_service< protocol_type, IoServiceProvider > & ps,
+ port_number_type port_num = 0);
+
+
+[section:overload1 common::basic_request_acceptor::basic_request_acceptor (1 of 3 overloads)]
+
+
+
+ template<
+ typename IoServiceProvider ,
+ typename InternetProtocol >
+ basic_request_acceptor(
+ common::basic_protocol_service< protocol_type, IoServiceProvider > & ps,
+ const InternetProtocol & ip,
+ const native_type & native_acceptor);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_request_acceptor::basic_request_acceptor (2 of 3 overloads)]
+
+
+
+ template<
+ typename IoServiceProvider ,
+ typename InternetProtocol >
+ basic_request_acceptor(
+ common::basic_protocol_service< protocol_type, IoServiceProvider > & ps,
+ const boost::asio::ip::basic_endpoint< InternetProtocol > & endpoint,
+ bool reuse_addr = true);
+
+
+
+[endsect]
+
+
+
+[section:overload3 common::basic_request_acceptor::basic_request_acceptor (3 of 3 overloads)]
+
+
+
+ template<
+ typename IoServiceProvider >
+ basic_request_acceptor(
+ common::basic_protocol_service< protocol_type, IoServiceProvider > & ps,
+ port_number_type port_num = 0);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:bind common::basic_request_acceptor::bind]
+
+[indexterm2 bind..common::basic_request_acceptor]
+
+ template<
+ typename Endpoint >
+ boost::system::error_code ``[link cgi.reference.common__basic_request_acceptor.bind.overload1 bind]``(
+ Endpoint & ep,
+ boost::system::error_code & ec);
+
+ template<
+ typename Endpoint >
+ void ``[link cgi.reference.common__basic_request_acceptor.bind.overload2 bind]``(
+ Endpoint & ep);
+
+
+[section:overload1 common::basic_request_acceptor::bind (1 of 2 overloads)]
+
+
+
+ template<
+ typename Endpoint >
+ boost::system::error_code bind(
+ Endpoint & ep,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_request_acceptor::bind (2 of 2 overloads)]
+
+
+
+ template<
+ typename Endpoint >
+ void bind(
+ Endpoint & ep);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:cancel common::basic_request_acceptor::cancel]
+
+[indexterm2 cancel..common::basic_request_acceptor] Cancel all asynchronous operations associated with the acceptor.
+
+ boost::system::error_code cancel();
+
+
+
+[endsect]
+
+
+[section:close common::basic_request_acceptor::close]
+
+[indexterm2 close..common::basic_request_acceptor] Close the acceptor.
+
+ boost::system::error_code ``[link cgi.reference.common__basic_request_acceptor.close.overload1 close]``(
+ boost::system::error_code & ec);
+
+ void ``[link cgi.reference.common__basic_request_acceptor.close.overload2 close]``();
+
+
+[section:overload1 common::basic_request_acceptor::close (1 of 2 overloads)]
+
+Close the acceptor.
+
+ boost::system::error_code close(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_request_acceptor::close (2 of 2 overloads)]
+
+Close the acceptor.
+
+ void close();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:endpoint_type common::basic_request_acceptor::endpoint_type]
+
+[indexterm2 endpoint_type..common::basic_request_acceptor]
+
+ typedef service_type::endpoint_type endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:is_cgi common::basic_request_acceptor::is_cgi]
+
+[indexterm2 is_cgi..common::basic_request_acceptor]
+
+ bool is_cgi();
+
+
+
+[endsect]
+
+
+
+[section:is_open common::basic_request_acceptor::is_open]
+
+[indexterm2 is_open..common::basic_request_acceptor] Check if the acceptor is open.
+
+ bool is_open();
+
+
+
+[endsect]
+
+
+[section:listen common::basic_request_acceptor::listen]
+
+[indexterm2 listen..common::basic_request_acceptor] Set the acceptor to listen.
+
+ boost::system::error_code ``[link cgi.reference.common__basic_request_acceptor.listen.overload1 listen]``(
+ int backlog,
+ boost::system::error_code & ec);
+
+ void ``[link cgi.reference.common__basic_request_acceptor.listen.overload2 listen]``(
+ int backlog = boost::asio::socket_base::max_connections);
+
+
+[section:overload1 common::basic_request_acceptor::listen (1 of 2 overloads)]
+
+Set the acceptor to listen.
+
+ boost::system::error_code listen(
+ int backlog,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_request_acceptor::listen (2 of 2 overloads)]
+
+Set the acceptor to listen.
+
+ void listen(
+ int backlog = boost::asio::socket_base::max_connections);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:local_endpoint common::basic_request_acceptor::local_endpoint]
+
+[indexterm2 local_endpoint..common::basic_request_acceptor]
+
+ endpoint_type ``[link cgi.reference.common__basic_request_acceptor.local_endpoint.overload1 local_endpoint]``(
+ boost::system::error_code & ec) const;
+
+ endpoint_type ``[link cgi.reference.common__basic_request_acceptor.local_endpoint.overload2 local_endpoint]``();
+
+
+[section:overload1 common::basic_request_acceptor::local_endpoint (1 of 2 overloads)]
+
+
+
+ endpoint_type local_endpoint(
+ boost::system::error_code & ec) const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_request_acceptor::local_endpoint (2 of 2 overloads)]
+
+
+
+ endpoint_type local_endpoint();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:native common::basic_request_acceptor::native]
+
+[indexterm2 native..common::basic_request_acceptor]
+
+ native_type native();
+
+
+
+[endsect]
+
+
+
+[section:native_type common::basic_request_acceptor::native_type]
+
+[indexterm2 native_type..common::basic_request_acceptor]
+
+ typedef service_type::native_type native_type;
+
+
+
+
+[endsect]
+
+
+
+[section:next_layer_type common::basic_request_acceptor::next_layer_type]
+
+[indexterm2 next_layer_type..common::basic_request_acceptor]
+
+ typedef service_type::implementation_type::acceptor_service_type next_layer_type;
+
+
+
+
+[endsect]
+
+
+[section:open common::basic_request_acceptor::open]
+
+[indexterm2 open..common::basic_request_acceptor] Open the acceptor.
+
+ template<
+ typename Protocol >
+ boost::system::error_code ``[link cgi.reference.common__basic_request_acceptor.open.overload1 open]``(
+ const Protocol & protocol,
+ boost::system::error_code & ec);
+
+ template<
+ typename Protocol >
+ void ``[link cgi.reference.common__basic_request_acceptor.open.overload2 open]``(
+ const Protocol & protocol);
+
+
+[section:overload1 common::basic_request_acceptor::open (1 of 2 overloads)]
+
+Open the acceptor.
+
+ template<
+ typename Protocol >
+ boost::system::error_code open(
+ const Protocol & protocol,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_request_acceptor::open (2 of 2 overloads)]
+
+Open the acceptor.
+
+ template<
+ typename Protocol >
+ void open(
+ const Protocol & protocol);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:port_number_type common::basic_request_acceptor::port_number_type]
+
+[indexterm2 port_number_type..common::basic_request_acceptor]
+
+ typedef service_type::implementation_type::port_number_type port_number_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_service common::basic_request_acceptor::protocol_service]
+
+[indexterm2 protocol_service..common::basic_request_acceptor]
+
+ protocol_service_type & protocol_service() const;
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type common::basic_request_acceptor::protocol_service_type]
+
+[indexterm2 protocol_service_type..common::basic_request_acceptor]
+
+ typedef service_type::service_impl_type::protocol_service_type protocol_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type common::basic_request_acceptor::protocol_type]
+
+[indexterm2 protocol_type..common::basic_request_acceptor]
+
+ typedef service_type::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:service_type common::basic_request_acceptor::service_type]
+
+[indexterm2 service_type..common::basic_request_acceptor]
+
+ typedef RequestAcceptorService service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:_basic_request_acceptor common::basic_request_acceptor::~basic_request_acceptor]
+
+[indexterm2 ~basic_request_acceptor..common::basic_request_acceptor]
+
+ ~basic_request_acceptor();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__basic_response common::basic_response]
+
+The response class: a helper for responding to requests.
+
+ template<
+ typename T>
+ class basic_response
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_response.char_type [*char_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_response.ostream_type [*ostream_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_response.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_response.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_response.async_send [*async_send]]]
+ [Asynchronously send the data through the supplied request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.basic_response [*basic_response]]]
+ [Construct with a particular buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.charset [*charset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.clear [*clear]]]
+ [Clear the response buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.clear_headers [*clear_headers]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.content_length [*content_length]]]
+ [Get the length of the body of the response (ie. not including the headers). ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.do_async_send [*do_async_send]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.end_headers [*end_headers]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.flush [*flush]]]
+ [Synchronously flush the data via the supplied request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.header_value [*header_value]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.headers [*headers]]]
+ [Get the headers. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.headers_terminated [*headers_terminated]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.ostream [*ostream]]]
+ [Get the ostream containing the response body. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.rdbuf [*rdbuf]]]
+ [Get the buffer associated with the stream. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.resend [*resend]]]
+ [Resend headers + content regardless of value of `headers_terminated_`. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.reset [*reset]]]
+ [Return the response to the 'just constructed' state. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.reset_headers [*reset_headers]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.send [*send]]]
+ [Synchronously send the data via the supplied request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.set_header [*set_header]]]
+ [Format and add a header given name and value, appending CRLF. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.set_status [*set_status]]]
+ [Set the status code associated with the response. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.status [*status]]]
+ [Get the status code associated with the response. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.str [*str]]]
+ [Get the contents of the response as a string. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.unterminate_headers [*unterminate_headers]]]
+ [Allow more headers to be added (WARNING: avoid using this). ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.write [*write]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response._basic_response [*~basic_response]]]
+ []
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_response.buffer_ [*buffer_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.charset_ [*charset_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.headers_ [*headers_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.headers_terminated_ [*headers_terminated_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.http_status_ [*http_status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.ostream_ [*ostream_]]]
+ []
+ ]
+
+]
+
+
+[section:async_send common::basic_response::async_send]
+
+[indexterm2 async_send..common::basic_response] Asynchronously send the data through the supplied request.
+
+ template<
+ typename AsyncWriteStream ,
+ typename Handler >
+ void async_send(
+ AsyncWriteStream & aws,
+ Handler handler);
+
+
+Note: This is quite crude at the moment and not as asynchronous as it could/should be. The data in the stream isn't cleared after this call.
+
+
+[endsect]
+
+
+[section:basic_response common::basic_response::basic_response]
+
+[indexterm2 basic_response..common::basic_response] Construct with a particular buffer.
+
+ ``[link cgi.reference.common__basic_response.basic_response.overload1 basic_response]``(
+ ::cgi::common::streambuf * buf,
+ common::http::status_code sc = common::http::ok);
+
+ ``[link cgi.reference.common__basic_response.basic_response.overload2 basic_response]``(
+ common::http::status_code sc = common::http::ok);
+
+
+[section:overload1 common::basic_response::basic_response (1 of 2 overloads)]
+
+Construct with a particular buffer.
+
+ basic_response(
+ ::cgi::common::streambuf * buf,
+ common::http::status_code sc = common::http::ok);
+
+
+Takes the buffer and uses it internally, does nothing with it on destruction.
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_response::basic_response (2 of 2 overloads)]
+
+
+
+ basic_response(
+ common::http::status_code sc = common::http::ok);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:buffer_ common::basic_response::buffer_]
+
+[indexterm2 buffer_..common::basic_response]
+
+ boost::shared_ptr< common::streambuf > buffer_;
+
+
+
+[endsect]
+
+
+
+[section:char_type common::basic_response::char_type]
+
+[indexterm2 char_type..common::basic_response]
+
+ typedef T char_type;
+
+
+
+
+[endsect]
+
+
+
+[section:charset common::basic_response::charset]
+
+[indexterm2 charset..common::basic_response]
+
+ string_type & charset();
+
+
+
+[endsect]
+
+
+
+[section:charset_ common::basic_response::charset_]
+
+[indexterm2 charset_..common::basic_response]
+
+ string_type charset_;
+
+
+
+[endsect]
+
+
+
+[section:clear common::basic_response::clear]
+
+[indexterm2 clear..common::basic_response] Clear the response buffer.
+
+ void clear();
+
+
+
+[endsect]
+
+
+
+[section:clear_headers common::basic_response::clear_headers]
+
+[indexterm2 clear_headers..common::basic_response]
+
+ void clear_headers();
+
+
+
+[endsect]
+
+
+
+[section:content_length common::basic_response::content_length]
+
+[indexterm2 content_length..common::basic_response] Get the length of the body of the response (ie. not including the headers).
+
+ std::size_t content_length();
+
+
+Get the length of the body of the response.
+
+
+[endsect]
+
+
+
+[section:do_async_send common::basic_response::do_async_send]
+
+[indexterm2 do_async_send..common::basic_response]
+
+ template<
+ typename AsyncWriteStream ,
+ typename Handler >
+ void do_async_send(
+ AsyncWriteStream & aws,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:end_headers common::basic_response::end_headers]
+
+[indexterm2 end_headers..common::basic_response]
+
+ void end_headers();
+
+
+
+[endsect]
+
+
+[section:flush common::basic_response::flush]
+
+[indexterm2 flush..common::basic_response] Synchronously flush the data via the supplied request.
+
+ template<
+ typename SyncWriteStream >
+ boost::system::error_code ``[link cgi.reference.common__basic_response.flush.overload1 flush]``(
+ SyncWriteStream & sws,
+ boost::system::error_code & ec);
+
+ template<
+ typename SyncWriteStream >
+ void ``[link cgi.reference.common__basic_response.flush.overload2 flush]``(
+ SyncWriteStream & sws);
+
+
+[section:overload1 common::basic_response::flush (1 of 2 overloads)]
+
+Synchronously flush the data via the supplied request.
+
+ template<
+ typename SyncWriteStream >
+ boost::system::error_code flush(
+ SyncWriteStream & sws,
+ boost::system::error_code & ec);
+
+
+This call uses error\_code semantics. ie. ec is set if an error occurs. If there is no error, the buffer is cleared.
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_response::flush (2 of 2 overloads)]
+
+Synchronously flush the data to the supplied SyncWriteStream.
+
+ template<
+ typename SyncWriteStream >
+ void flush(
+ SyncWriteStream & sws);
+
+
+This call uses throwing semantics. ie. an exception will be thrown on any failure. If there is no error, the buffer is cleared.
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:header_value common::basic_response::header_value]
+
+[indexterm2 header_value..common::basic_response]
+
+ string_type header_value(
+ string_type const & name);
+
+
+
+[endsect]
+
+
+
+[section:headers common::basic_response::headers]
+
+[indexterm2 headers..common::basic_response] Get the headers.
+
+ std::vector< string_type > & headers();
+
+
+Get the ostream containing the response body.
+
+
+[endsect]
+
+
+
+[section:headers_ common::basic_response::headers_]
+
+[indexterm2 headers_..common::basic_response]
+
+ std::vector< string_type > headers_;
+
+
+
+[endsect]
+
+
+
+[section:headers_terminated common::basic_response::headers_terminated]
+
+[indexterm2 headers_terminated..common::basic_response]
+
+ bool headers_terminated() const;
+
+
+
+[endsect]
+
+
+
+[section:headers_terminated_ common::basic_response::headers_terminated_]
+
+[indexterm2 headers_terminated_..common::basic_response]
+
+ bool headers_terminated_;
+
+
+
+[endsect]
+
+
+
+[section:http_status_ common::basic_response::http_status_]
+
+[indexterm2 http_status_..common::basic_response]
+
+ http::status_code http_status_;
+
+
+
+[endsect]
+
+
+
+[section:ostream common::basic_response::ostream]
+
+[indexterm2 ostream..common::basic_response] Get the ostream containing the response body.
+
+ ostream_type & ostream();
+
+
+
+[endsect]
+
+
+
+[section:ostream_ common::basic_response::ostream_]
+
+[indexterm2 ostream_..common::basic_response]
+
+ ostream_type ostream_;
+
+
+
+[endsect]
+
+
+
+[section:ostream_type common::basic_response::ostream_type]
+
+[indexterm2 ostream_type..common::basic_response]
+
+ typedef std::basic_ostream< T > ostream_type;
+
+
+
+
+[endsect]
+
+
+
+[section:rdbuf common::basic_response::rdbuf]
+
+[indexterm2 rdbuf..common::basic_response] Get the buffer associated with the stream.
+
+ common::streambuf * rdbuf();
+
+
+
+[endsect]
+
+
+
+[section:resend common::basic_response::resend]
+
+[indexterm2 resend..common::basic_response] Resend headers + content regardless of value of `headers_terminated_`.
+
+ template<
+ typename SyncWriteStream >
+ void resend(
+ SyncWriteStream & sws);
+
+
+
+[endsect]
+
+
+
+[section:reset common::basic_response::reset]
+
+[indexterm2 reset..common::basic_response] Return the response to the 'just constructed' state.
+
+ void reset();
+
+
+
+[endsect]
+
+
+
+[section:reset_headers common::basic_response::reset_headers]
+
+[indexterm2 reset_headers..common::basic_response]
+
+ void reset_headers();
+
+
+
+[endsect]
+
+
+
+[section:self_type common::basic_response::self_type]
+
+[indexterm2 self_type..common::basic_response]
+
+ typedef basic_response< T > self_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_response.char_type [*char_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_response.ostream_type [*ostream_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_response.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_response.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_response.async_send [*async_send]]]
+ [Asynchronously send the data through the supplied request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.basic_response [*basic_response]]]
+ [Construct with a particular buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.charset [*charset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.clear [*clear]]]
+ [Clear the response buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.clear_headers [*clear_headers]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.content_length [*content_length]]]
+ [Get the length of the body of the response (ie. not including the headers). ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.do_async_send [*do_async_send]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.end_headers [*end_headers]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.flush [*flush]]]
+ [Synchronously flush the data via the supplied request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.header_value [*header_value]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.headers [*headers]]]
+ [Get the headers. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.headers_terminated [*headers_terminated]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.ostream [*ostream]]]
+ [Get the ostream containing the response body. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.rdbuf [*rdbuf]]]
+ [Get the buffer associated with the stream. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.resend [*resend]]]
+ [Resend headers + content regardless of value of `headers_terminated_`. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.reset [*reset]]]
+ [Return the response to the 'just constructed' state. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.reset_headers [*reset_headers]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.send [*send]]]
+ [Synchronously send the data via the supplied request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.set_header [*set_header]]]
+ [Format and add a header given name and value, appending CRLF. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.set_status [*set_status]]]
+ [Set the status code associated with the response. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.status [*status]]]
+ [Get the status code associated with the response. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.str [*str]]]
+ [Get the contents of the response as a string. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.unterminate_headers [*unterminate_headers]]]
+ [Allow more headers to be added (WARNING: avoid using this). ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.write [*write]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response._basic_response [*~basic_response]]]
+ []
+ ]
+
+]
+
+[heading Protected Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_response.buffer_ [*buffer_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.charset_ [*charset_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.headers_ [*headers_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.headers_terminated_ [*headers_terminated_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.http_status_ [*http_status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_response.ostream_ [*ostream_]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:send common::basic_response::send]
+
+[indexterm2 send..common::basic_response] Synchronously send the data via the supplied request.
+
+ template<
+ typename SyncWriteStream >
+ boost::system::error_code ``[link cgi.reference.common__basic_response.send.overload1 send]``(
+ SyncWriteStream & sws,
+ boost::system::error_code & ec);
+
+ template<
+ typename SyncWriteStream >
+ void ``[link cgi.reference.common__basic_response.send.overload2 send]``(
+ SyncWriteStream & sws);
+
+
+[section:overload1 common::basic_response::send (1 of 2 overloads)]
+
+Synchronously send the data via the supplied request.
+
+ template<
+ typename SyncWriteStream >
+ boost::system::error_code send(
+ SyncWriteStream & sws,
+ boost::system::error_code & ec);
+
+
+This call will not throw, but will set `ec` such that `ec == true` if an error occurs. Details of the error are held in the `error\_code` object.
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_response::send (2 of 2 overloads)]
+
+Synchronously send the data via the supplied request.
+
+ template<
+ typename SyncWriteStream >
+ void send(
+ SyncWriteStream & sws);
+
+
+This call uses throwing semantics. ie. an exception will be thrown on any failure. Note: The data in the stream isn't cleared after this call.
+
+
+[endsect]
+
+
+[endsect]
+
+[section:set_header common::basic_response::set_header]
+
+[indexterm2 set_header..common::basic_response] Format and add a header given name and value, appending CRLF.
+
+ basic_response< char_type > & ``[link cgi.reference.common__basic_response.set_header.overload1 set_header]``(
+ string_type const & name,
+ string_type const & value);
+
+ basic_response< char_type > & ``[link cgi.reference.common__basic_response.set_header.overload2 set_header]``(
+ const string_type & value);
+
+
+[section:overload1 common::basic_response::set_header (1 of 2 overloads)]
+
+Format and add a header given name and value, appending CRLF.
+
+ basic_response< char_type > & set_header(
+ string_type const & name,
+ string_type const & value);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_response::set_header (2 of 2 overloads)]
+
+Add a header after appending the CRLF sequence.
+
+ basic_response< char_type > & set_header(
+ const string_type & value);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:set_status common::basic_response::set_status]
+
+[indexterm2 set_status..common::basic_response] Set the status code associated with the response.
+
+ basic_response< char_type > & set_status(
+ const http::status_code & num);
+
+
+
+[endsect]
+
+
+
+[section:status common::basic_response::status]
+
+[indexterm2 status..common::basic_response] Get the status code associated with the response.
+
+ http::status_code & status();
+
+
+
+[endsect]
+
+
+
+[section:str common::basic_response::str]
+
+[indexterm2 str..common::basic_response] Get the contents of the response as a string.
+
+ string_type str() const;
+
+
+Get the response as a string.
+
+This copies the contents of the response into a string. Headers aren't included in the dump.
+
+
+[endsect]
+
+
+
+[section:string_type common::basic_response::string_type]
+
+[indexterm2 string_type..common::basic_response]
+
+ typedef std::basic_string< T > string_type;
+
+
+
+
+[endsect]
+
+
+
+[section:unterminate_headers common::basic_response::unterminate_headers]
+
+[indexterm2 unterminate_headers..common::basic_response] Allow more headers to be added (WARNING: avoid using this).
+
+ void unterminate_headers();
+
+
+
+[endsect]
+
+
+[section:write common::basic_response::write]
+
+[indexterm2 write..common::basic_response]
+
+ template<
+ typename T >
+ BOOST_CGI_INLINE std::size_t ``[link cgi.reference.common__basic_response.write.overload1 write]``(
+ std::basic_string< T > const & str);
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t ``[link cgi.reference.common__basic_response.write.overload2 write]``(
+ const ConstBufferSequence & buf);
+
+ std::size_t ``[link cgi.reference.common__basic_response.write.overload3 write]``(
+ string_type const & str);
+
+ std::size_t ``[link cgi.reference.common__basic_response.write.overload4 write]``(
+ const char_type * str,
+ std::size_t len);
+
+
+[section:overload1 common::basic_response::write (1 of 4 overloads)]
+
+
+
+ template<
+ typename T >
+ BOOST_CGI_INLINE std::size_t write(
+ std::basic_string< T > const & str);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::basic_response::write (2 of 4 overloads)]
+
+
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write(
+ const ConstBufferSequence & buf);
+
+
+
+[endsect]
+
+
+
+[section:overload3 common::basic_response::write (3 of 4 overloads)]
+
+
+
+ std::size_t write(
+ string_type const & str);
+
+
+
+[endsect]
+
+
+
+[section:overload4 common::basic_response::write (4 of 4 overloads)]
+
+
+
+ std::size_t write(
+ const char_type * str,
+ std::size_t len);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:_basic_response common::basic_response::~basic_response]
+
+[indexterm2 ~basic_response..common::basic_response]
+
+ ~basic_response();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__charset_header common::charset_header]
+
+
+
+ template<
+ typename ``[link cgi.reference.CharT CharT]``>
+ struct charset_header
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__charset_header.char_type [*char_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__charset_header.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__charset_header.charset_header [*charset_header]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__charset_header.content [*content]]]
+ []
+ ]
+
+]
+
+
+[section:char_type common::charset_header::char_type]
+
+[indexterm2 char_type..common::charset_header]
+
+ typedef CharT char_type;
+
+
+
+
+[endsect]
+
+
+
+[section:charset_header common::charset_header::charset_header]
+
+[indexterm2 charset_header..common::charset_header]
+
+ charset_header(
+ const string_type & _content);
+
+
+
+[endsect]
+
+
+
+[section:content common::charset_header::content]
+
+[indexterm2 content..common::charset_header]
+
+ string_type content;
+
+
+
+[endsect]
+
+
+
+[section:string_type common::charset_header::string_type]
+
+[indexterm2 string_type..common::charset_header]
+
+ typedef std::basic_string< CharT > string_type;
+
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:common__client_status common::client_status]
+
+[indexterm1 common::client_status]
+
+ enum client_status
+
+[heading Values]
+[variablelist
+
+ [
+ [none_]
+ []
+ ]
+
+ [
+ [constructed]
+ []
+ ]
+
+ [
+ [params_read]
+ []
+ ]
+
+ [
+ [stdin_read]
+ []
+ ]
+
+ [
+ [end_request_sent]
+ []
+ ]
+
+ [
+ [closed_]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:common__connection__stderr common::connection::stderr]
+
+[indexterm1 common::connection::stderr]
+
+ typedef basic_connection< tags::stderr > stderr;
+
+
+
+
+[endsect]
+
+
+
+[section:common__cookie_data_type common::cookie_data_type]
+
+[indexterm1 common::cookie_data_type]
+
+ enum cookie_data_type
+
+[heading Values]
+[variablelist
+
+ [
+ [cookies]
+ []
+ ]
+
+ [
+ [cookie_data]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:common__env_data_type common::env_data_type]
+
+[indexterm1 common::env_data_type] Types of data sources and related enums.
+
+ enum env_data_type
+
+[heading Values]
+[variablelist
+
+ [
+ [env]
+ []
+ ]
+
+ [
+ [env_data]
+ []
+ ]
+
+]
+
+
+Each data source is given a unique type. This is so the accessor operators on a `basic\_request<>` are compile-time aliases to the internal data maps.
+
+If you want to add a new data type to a request you need to: > Update this file > Update map.hpp with a new map type > Update `data\_map\_type` in the `request\_base` class > Use the `BOOST\_CGI\_DETAIL\_MAP\_ACCESS` macro in `basic\_request<>`, next to the other uses of it.
+
+
+[endsect]
+
+
+
+[section:common__error__cgi_errors common::error::cgi_errors]
+
+[indexterm1 common::error::cgi_errors]
+
+ enum cgi_errors
+
+[heading Values]
+[variablelist
+
+ [
+ [client_closed]
+ []
+ ]
+
+ [
+ [duplicate_request]
+ []
+ ]
+
+ [
+ [accepting_on_an_open_request]
+ []
+ ]
+
+ [
+ [invalid_socket]
+ []
+ ]
+
+ [
+ [invalid_form_type]
+ []
+ ]
+
+ [
+ [broken_pipe]
+ []
+ ]
+
+ [
+ [bad_read]
+ []
+ ]
+
+ [
+ [client_not_open]
+ []
+ ]
+
+ [
+ [eof]
+ []
+ ]
+
+ [
+ [multipart_form_boundary_not_found]
+ []
+ ]
+
+ [
+ [multipart_meta_data_not_terminated]
+ []
+ ]
+
+ [
+ [no_boundary_marker]
+ []
+ ]
+
+ [
+ [max_post_exceeded]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:common__fcgi_ common::fcgi_]
+
+FastCGI.
+
+ struct fcgi_
+
+
+
+[endsect]
+
+
+[section:common__form_data_type common::form_data_type]
+
+[indexterm1 common::form_data_type]
+
+ enum form_data_type
+
+[heading Values]
+[variablelist
+
+ [
+ [form]
+ []
+ ]
+
+ [
+ [form_data]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:common__form_part common::form_part]
+
+
+
+ struct form_part
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__form_part.buffer_type [*buffer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__form_part.iter_t [*iter_t]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__form_part.meta_data_map_type [*meta_data_map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__form_part.pair_t [*pair_t]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__form_part.range_type [*range_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__form_part.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__form_part.form_part [*form_part]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__form_part.operator_eq__eq_ [*operator==]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__form_part.boundary_marker_ [*boundary_marker_]]]
+ [The boundary marker that's needed. ]
+ ]
+
+ [
+ [[link cgi.reference.common__form_part.buffer_ [*buffer_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__form_part.content_disposition [*content_disposition]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__form_part.content_type [*content_type]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__form_part.filename [*filename]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__form_part.meta_data_ [*meta_data_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__form_part.name [*name]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__form_part.path [*path]]]
+ []
+ ]
+
+]
+
+
+[section:boundary_marker_ common::form_part::boundary_marker_]
+
+[indexterm2 boundary_marker_..common::form_part] The boundary marker that's needed.
+
+ string_type boundary_marker_;
+
+
+
+[endsect]
+
+
+
+[section:buffer_ common::form_part::buffer_]
+
+[indexterm2 buffer_..common::form_part]
+
+ pair_t buffer_;
+
+
+
+[endsect]
+
+
+
+[section:buffer_type common::form_part::buffer_type]
+
+[indexterm2 buffer_type..common::form_part]
+
+ typedef string_type buffer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:content_disposition common::form_part::content_disposition]
+
+[indexterm2 content_disposition..common::form_part]
+
+ string_type content_disposition;
+
+
+
+[endsect]
+
+
+
+[section:content_type common::form_part::content_type]
+
+[indexterm2 content_type..common::form_part]
+
+ string_type content_type;
+
+
+
+[endsect]
+
+
+
+[section:filename common::form_part::filename]
+
+[indexterm2 filename..common::form_part]
+
+ string_type filename;
+
+
+
+[endsect]
+
+
+
+[section:form_part common::form_part::form_part]
+
+[indexterm2 form_part..common::form_part]
+
+ form_part();
+
+
+
+[endsect]
+
+
+
+[section:iter_t common::form_part::iter_t]
+
+[indexterm2 iter_t..common::form_part]
+
+ typedef buffer_type::iterator iter_t;
+
+
+
+
+[endsect]
+
+
+
+[section:meta_data_ common::form_part::meta_data_]
+
+[indexterm2 meta_data_..common::form_part]
+
+ meta_data_map_type meta_data_;
+
+
+
+[endsect]
+
+
+
+[section:meta_data_map_type common::form_part::meta_data_map_type]
+
+[indexterm2 meta_data_map_type..common::form_part]
+
+ typedef std::map< string_type, pair_t > meta_data_map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:name common::form_part::name]
+
+[indexterm2 name..common::form_part]
+
+ string_type name;
+
+
+
+[endsect]
+
+
+
+[section:operator_eq__eq_ common::form_part::operator==]
+
+[indexterm2 operator==..common::form_part]
+
+ bool operator==(
+ form_part & other);
+
+
+
+[endsect]
+
+
+
+[section:pair_t common::form_part::pair_t]
+
+[indexterm2 pair_t..common::form_part]
+
+ typedef std::pair< iter_t, iter_t > pair_t;
+
+
+
+
+[endsect]
+
+
+
+[section:path common::form_part::path]
+
+[indexterm2 path..common::form_part]
+
+ string_type path;
+
+
+
+[endsect]
+
+
+
+[section:range_type common::form_part::range_type]
+
+[indexterm2 range_type..common::form_part]
+
+ typedef boost::iterator_range< buffer_type::const_iterator > range_type;
+
+
+
+
+[endsect]
+
+
+
+[section:string_type common::form_part::string_type]
+
+[indexterm2 string_type..common::form_part]
+
+ typedef std::string string_type;
+
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:common__get_data_type common::get_data_type]
+
+[indexterm1 common::get_data_type]
+
+ enum get_data_type
+
+[heading Values]
+[variablelist
+
+ [
+ [get]
+ []
+ ]
+
+ [
+ [get_data]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:common__http__status_code common::http::status_code]
+
+[indexterm1 common::http::status_code] Standard HTTP status codes.
+
+ enum status_code
+
+[heading Values]
+[variablelist
+
+ [
+ [continue_]
+ [Informational codes. ]
+ ]
+
+ [
+ [switching_protocols]
+ []
+ ]
+
+ [
+ [processing]
+ []
+ ]
+
+ [
+ [ok]
+ [Success codes. ]
+ ]
+
+ [
+ [created]
+ []
+ ]
+
+ [
+ [accepted]
+ []
+ ]
+
+ [
+ [non_authorative_information]
+ []
+ ]
+
+ [
+ [no_content]
+ []
+ ]
+
+ [
+ [reset_content]
+ []
+ ]
+
+ [
+ [partial_content]
+ []
+ ]
+
+ [
+ [multi_status]
+ []
+ ]
+
+ [
+ [multiple_choices]
+ [Redirect codes. ]
+ ]
+
+ [
+ [moved_permanently]
+ []
+ ]
+
+ [
+ [found]
+ []
+ ]
+
+ [
+ [see_other]
+ []
+ ]
+
+ [
+ [not_modified]
+ []
+ ]
+
+ [
+ [use_proxy]
+ []
+ ]
+
+ [
+ [switch_proxy]
+ []
+ ]
+
+ [
+ [temporary_redirect]
+ []
+ ]
+
+ [
+ [bad_request]
+ [Domain error codes. ]
+ ]
+
+ [
+ [unauthorized]
+ []
+ ]
+
+ [
+ [payment_required]
+ []
+ ]
+
+ [
+ [forbidden]
+ []
+ ]
+
+ [
+ [not_found]
+ []
+ ]
+
+ [
+ [method_not_allowed]
+ []
+ ]
+
+ [
+ [not_acceptable]
+ []
+ ]
+
+ [
+ [proxy_authentication_required]
+ []
+ ]
+
+ [
+ [request_timeout]
+ []
+ ]
+
+ [
+ [conflict]
+ []
+ ]
+
+ [
+ [gone]
+ []
+ ]
+
+ [
+ [length_required]
+ []
+ ]
+
+ [
+ [precondition_failed]
+ []
+ ]
+
+ [
+ [request_entity_too_large]
+ []
+ ]
+
+ [
+ [request_uri_too_long]
+ []
+ ]
+
+ [
+ [unsupported_media_type]
+ []
+ ]
+
+ [
+ [request_range_not_satisfiable]
+ []
+ ]
+
+ [
+ [expectation_failed]
+ []
+ ]
+
+ [
+ [unprocessable_entity]
+ []
+ ]
+
+ [
+ [locked]
+ []
+ ]
+
+ [
+ [failed_dependency]
+ []
+ ]
+
+ [
+ [unordered_collection]
+ []
+ ]
+
+ [
+ [upgrade_required]
+ []
+ ]
+
+ [
+ [retry_with]
+ []
+ ]
+
+ [
+ [internal_server_error]
+ [Internal error codes. ]
+ ]
+
+ [
+ [not_implemented]
+ []
+ ]
+
+ [
+ [bad_gateway]
+ []
+ ]
+
+ [
+ [service_unavailable]
+ []
+ ]
+
+ [
+ [gateway_timeout]
+ []
+ ]
+
+ [
+ [http_version_not_supported]
+ []
+ ]
+
+ [
+ [insufficient_storage]
+ []
+ ]
+
+ [
+ [bandwidth_limit_exceeded]
+ []
+ ]
+
+]
+
+
+See http://tools.ietf.org/html/rfc2616#section-10
+
+
+[endsect]
+
+
+[section:common__ichar_traits common::ichar_traits]
+
+
+
+ template<
+ typename CharT >
+ struct ichar_traits
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__ichar_traits.compare [*compare]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__ichar_traits.eq [*eq]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__ichar_traits.find [*find]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__ichar_traits.lt [*lt]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__ichar_traits.ne [*ne]]]
+ []
+ ]
+
+]
+
+
+[section:compare common::ichar_traits::compare]
+
+[indexterm2 compare..common::ichar_traits]
+
+ static int compare(
+ const char * str1,
+ const char * str2,
+ std::size_t num);
+
+
+
+[endsect]
+
+
+
+[section:eq common::ichar_traits::eq]
+
+[indexterm2 eq..common::ichar_traits]
+
+ static bool eq(
+ char c1,
+ char c2);
+
+
+
+[endsect]
+
+
+
+[section:find common::ichar_traits::find]
+
+[indexterm2 find..common::ichar_traits]
+
+ static const char * find(
+ const char * str,
+ int n,
+ char a);
+
+
+
+[endsect]
+
+
+
+[section:lt common::ichar_traits::lt]
+
+[indexterm2 lt..common::ichar_traits]
+
+ static bool lt(
+ char c1,
+ char c2);
+
+
+
+[endsect]
+
+
+
+[section:ne common::ichar_traits::ne]
+
+[indexterm2 ne..common::ichar_traits]
+
+ static bool ne(
+ char c1,
+ char c2);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__io_service_provider common::io_service_provider]
+
+Hold a set number of io_services and return them based on the Policy.
+
+ template<
+ typename PoolingPolicy >
+ class io_service_provider
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__io_service_provider.get_io_service [*get_io_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__io_service_provider.io_service_provider [*io_service_provider]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__io_service_provider.reset [*reset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__io_service_provider.run [*run]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__io_service_provider.stop [*stop]]]
+ []
+ ]
+
+]
+
+Contains six member functions: io\_service() - returns a reference to an io\_service stop() - stops all io\_services run() - runs all io\_services reset() - resets all io\_services
+
+(strike) stop\_one() - stops one (running) io\_service (strike) run\_one() - runs one (not-yet-started/reset) io\_service
+
+It can also be set up so that only required io\_services are run: each call to io\_service() can get an io\_service, call io\_service::run() on it and then return it.
+
+
+[section:get_io_service common::io_service_provider::get_io_service]
+
+[indexterm2 get_io_service..common::io_service_provider]
+
+ ::cgi::common::io_service & get_io_service();
+
+
+
+[endsect]
+
+
+[section:io_service_provider common::io_service_provider::io_service_provider]
+
+[indexterm2 io_service_provider..common::io_service_provider]
+
+ ``[link cgi.reference.common__io_service_provider.io_service_provider.overload1 io_service_provider]``();
+
+ ``[link cgi.reference.common__io_service_provider.io_service_provider.overload2 io_service_provider]``(
+ int );
+
+
+[section:overload1 common::io_service_provider::io_service_provider (1 of 2 overloads)]
+
+
+
+ io_service_provider();
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::io_service_provider::io_service_provider (2 of 2 overloads)]
+
+
+
+ io_service_provider(
+ int );
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:reset common::io_service_provider::reset]
+
+[indexterm2 reset..common::io_service_provider]
+
+ void reset();
+
+
+
+[endsect]
+
+
+
+[section:run common::io_service_provider::run]
+
+[indexterm2 run..common::io_service_provider]
+
+ void run();
+
+
+
+[endsect]
+
+
+
+[section:stop common::io_service_provider::stop]
+
+[indexterm2 stop..common::io_service_provider]
+
+ void stop();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__is_async common::is_async]
+
+
+
+ template<
+ typename Protocol >
+ struct is_async
+
+
+
+[endsect]
+
+[section:common__is_async_lt__tags__cgi__gt_ common::is_async< tags::cgi >]
+
+
+
+ template<>
+ struct is_async< tags::cgi >
+
+
+
+[endsect]
+
+
+[section:common__parse_options common::parse_options]
+
+[indexterm1 common::parse_options]
+
+ enum parse_options
+
+[heading Values]
+[variablelist
+
+ [
+ [parse_none]
+ []
+ ]
+
+ [
+ [parse_env]
+ []
+ ]
+
+ [
+ [parse_get_only]
+ []
+ ]
+
+ [
+ [parse_get]
+ []
+ ]
+
+ [
+ [parse_post_only]
+ []
+ ]
+
+ [
+ [parse_post]
+ []
+ ]
+
+ [
+ [parse_form]
+ []
+ ]
+
+ [
+ [parse_cookie_only]
+ []
+ ]
+
+ [
+ [parse_cookie]
+ []
+ ]
+
+ [
+ [parse_cookies_only]
+ []
+ ]
+
+ [
+ [parse_cookies]
+ []
+ ]
+
+ [
+ [parse_all]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:common__path_info common::path_info]
+
+
+
+ struct path_info
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__path_info.const_iterator [*const_iterator]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__path_info.iterator [*iterator]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__path_info.value_type [*value_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__path_info.vector_type [*vector_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__path_info.begin [*begin]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__path_info.end [*end]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__path_info.operator[] [*operator[]]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__path_info.path_info [*path_info]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__path_info.parts [*parts]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__path_info.value [*value]]]
+ []
+ ]
+
+]
+
+[section:begin common::path_info::begin]
+
+[indexterm2 begin..common::path_info]
+
+ const_iterator ``[link cgi.reference.common__path_info.begin.overload1 begin]``() const;
+
+ iterator ``[link cgi.reference.common__path_info.begin.overload2 begin]``();
+
+
+[section:overload1 common::path_info::begin (1 of 2 overloads)]
+
+
+
+ const_iterator begin() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::path_info::begin (2 of 2 overloads)]
+
+
+
+ iterator begin();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:const_iterator common::path_info::const_iterator]
+
+[indexterm2 const_iterator..common::path_info]
+
+ typedef vector_type::const_iterator const_iterator;
+
+
+
+
+[endsect]
+
+
+[section:end common::path_info::end]
+
+[indexterm2 end..common::path_info]
+
+ const_iterator ``[link cgi.reference.common__path_info.end.overload1 end]``() const;
+
+ iterator ``[link cgi.reference.common__path_info.end.overload2 end]``();
+
+
+[section:overload1 common::path_info::end (1 of 2 overloads)]
+
+
+
+ const_iterator end() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::path_info::end (2 of 2 overloads)]
+
+
+
+ iterator end();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:iterator common::path_info::iterator]
+
+[indexterm2 iterator..common::path_info]
+
+ typedef vector_type::iterator iterator;
+
+
+
+
+[endsect]
+
+
+
+[section:operator[] common::path_info::operator[]]
+
+[indexterm2 operator[]..common::path_info]
+
+ value_type & operator[](
+ int i);
+
+
+
+[endsect]
+
+
+
+[section:parts common::path_info::parts]
+
+[indexterm2 parts..common::path_info]
+
+ vector_type parts;
+
+
+
+[endsect]
+
+
+[section:path_info common::path_info::path_info]
+
+[indexterm2 path_info..common::path_info]
+
+ ``[link cgi.reference.common__path_info.path_info.overload1 path_info]``(
+ value_type const & str);
+
+ template<
+ typename S ,
+ typename P ,
+ typename A >
+ ``[link cgi.reference.common__path_info.path_info.overload2 path_info]``(
+ basic_request< S, P, A > & request);
+
+
+[section:overload1 common::path_info::path_info (1 of 2 overloads)]
+
+
+
+ path_info(
+ value_type const & str);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::path_info::path_info (2 of 2 overloads)]
+
+
+
+ template<
+ typename S ,
+ typename P ,
+ typename A >
+ path_info(
+ basic_request< S, P, A > & request);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:value common::path_info::value]
+
+[indexterm2 value..common::path_info]
+
+ value_type value;
+
+
+
+[endsect]
+
+
+
+[section:value_type common::path_info::value_type]
+
+[indexterm2 value_type..common::path_info]
+
+ typedef std::string value_type;
+
+
+
+
+[endsect]
+
+
+
+[section:vector_type common::path_info::vector_type]
+
+[indexterm2 vector_type..common::path_info]
+
+ typedef std::vector< value_type > vector_type;
+
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:common__post_data_type common::post_data_type]
+
+[indexterm1 common::post_data_type]
+
+ enum post_data_type
+
+[heading Values]
+[variablelist
+
+ [
+ [post]
+ []
+ ]
+
+ [
+ [post_data]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:common__request_base common::request_base]
+
+ABC that defines the common interface for basic_request<>s.
+
+ template<
+ typename T>
+ class request_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base [*impl_base]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__request_base.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+]
+
+This class provides generic member functions that can be used by any request type.
+
+
+[section:is_file common::request_base::is_file]
+
+[indexterm2 is_file..common::request_base] Check if a given POST variable represents a file upload.
+
+ template<
+ typename ImplType >
+ bool is_file(
+ ImplType & impl,
+ typename ImplType::string_type const & key);
+
+
+
+[endsect]
+
+
+
+[section:load common::request_base::load]
+
+[indexterm2 load..common::request_base] Synchronously read/parse the request meta-data.
+
+ template<
+ typename ImplType >
+ boost::system::error_code load(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:load_environment common::request_base::load_environment]
+
+[indexterm2 load_environment..common::request_base] Load the base_environment into the current environment.
+
+ template<
+ typename ImplType >
+ void load_environment(
+ ImplType & impl,
+ char ** base_environment,
+ bool is_command_line);
+
+
+Parsed the base\_environment and add it to the current request's environment. This overwrites any environment variables with the existing key.
+
+If `is\_command\_line` is true, then the first argument is skipped as this is the name of the program and ignored. Using it actually causes a crash on Windows (MSVC 9) anyway: I'm not exactly sure why.
+
+
+[endsect]
+
+
+
+[section:parse_cookie_vars common::request_base::parse_cookie_vars]
+
+[indexterm2 parse_cookie_vars..common::request_base] Read and parse the HTTP_COOKIE meta variable.
+
+ template<
+ typename ImplType >
+ boost::system::error_code parse_cookie_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_get_vars common::request_base::parse_get_vars]
+
+[indexterm2 parse_get_vars..common::request_base] Read and parse the cgi GET meta variables.
+
+ template<
+ typename ImplType >
+ boost::system::error_code parse_get_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[section:read_some common::request_base::read_some]
+
+[indexterm2 read_some..common::request_base] Read some data from the client into the supplied buffer.
+
+ template<
+ typename ImplType ,
+ typename MutableBufferSequence >
+ std::size_t ``[link cgi.reference.common__request_base.read_some.overload1 read_some]``(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ template<
+ typename ImplType >
+ std::size_t ``[link cgi.reference.common__request_base.read_some.overload2 read_some]``(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+[section:overload1 common::request_base::read_some (1 of 2 overloads)]
+
+Read some data from the client into the supplied buffer.
+
+ template<
+ typename ImplType ,
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::request_base::read_some (2 of 2 overloads)]
+
+Read some data into the internal buffer.
+
+ template<
+ typename ImplType >
+ std::size_t read_some(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:request_id common::request_base::request_id]
+
+[indexterm2 request_id..common::request_base] Get the request ID of a FastCGI request, or 1.
+
+ template<
+ typename ImplType >
+ boost::uint16_t const & request_id(
+ ImplType & impl) const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__request_base__impl_base common::request_base::impl_base]
+
+
+
+ struct impl_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base.buffer_type [*buffer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base.char_type [*char_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base.string_type [*string_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__request_base__impl_base.var_map_type [*var_map_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__request_base__impl_base.impl_base [*impl_base]]]
+ [Construct. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base__impl_base.prepare [*prepare]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__request_base__impl_base.env_parsed_ [*env_parsed_]]]
+ [Whether the environment has been parsed yet. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base__impl_base.form_parts_ [*form_parts_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_base__impl_base.get_parsed_ [*get_parsed_]]]
+ [Whether the get data has been parsed yet. ]
+ ]
+
+ [
+ [[link cgi.reference.common__request_base__impl_base.post_buffer_ [*post_buffer_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_base__impl_base.vars_ [*vars_]]]
+ []
+ ]
+
+]
+
+
+[section:buffer_type common::request_base::impl_base::buffer_type]
+
+[indexterm2 buffer_type..common::request_base::impl_base]
+
+ typedef string_type buffer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:char_type common::request_base::impl_base::char_type]
+
+[indexterm2 char_type..common::request_base::impl_base]
+
+ typedef char char_type;
+
+
+
+
+[endsect]
+
+
+
+[section:const_buffers_type common::request_base::impl_base::const_buffers_type]
+
+[indexterm2 const_buffers_type..common::request_base::impl_base]
+
+ typedef boost::asio::const_buffers_1 const_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:env_parsed_ common::request_base::impl_base::env_parsed_]
+
+[indexterm2 env_parsed_..common::request_base::impl_base] Whether the environment has been parsed yet.
+
+ bool env_parsed_;
+
+
+
+[endsect]
+
+
+
+[section:form_parts_ common::request_base::impl_base::form_parts_]
+
+[indexterm2 form_parts_..common::request_base::impl_base]
+
+ std::vector< common::form_part > form_parts_;
+
+
+
+[endsect]
+
+
+
+[section:get_parsed_ common::request_base::impl_base::get_parsed_]
+
+[indexterm2 get_parsed_..common::request_base::impl_base] Whether the get data has been parsed yet.
+
+ bool get_parsed_;
+
+
+
+[endsect]
+
+
+
+[section:impl_base common::request_base::impl_base::impl_base]
+
+[indexterm2 impl_base..common::request_base::impl_base] Construct.
+
+ impl_base();
+
+
+
+[endsect]
+
+
+
+[section:mutable_buffers_type common::request_base::impl_base::mutable_buffers_type]
+
+[indexterm2 mutable_buffers_type..common::request_base::impl_base]
+
+ typedef boost::asio::mutable_buffers_1 mutable_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:post_buffer_ common::request_base::impl_base::post_buffer_]
+
+[indexterm2 post_buffer_..common::request_base::impl_base]
+
+ buffer_type post_buffer_;
+
+
+
+[endsect]
+
+
+
+[section:prepare common::request_base::impl_base::prepare]
+
+[indexterm2 prepare..common::request_base::impl_base]
+
+ mutable_buffers_type prepare(
+ std::size_t size);
+
+
+
+[endsect]
+
+
+
+[section:string_type common::request_base::impl_base::string_type]
+
+[indexterm2 string_type..common::request_base::impl_base]
+
+ typedef std::basic_string< char_type > string_type;
+
+
+
+
+[endsect]
+
+
+
+[section:var_map_type common::request_base::impl_base::var_map_type]
+
+[indexterm2 var_map_type..common::request_base::impl_base]
+
+ typedef boost::fusion::vector< common::env_map, common::get_map, common::post_map, common::cookie_map, common::session_map > var_map_type;
+
+
+
+If you want to add a new data type to a request you need to: > Update this file (just below) > Update source_enums.hpp > Update map.hpp with a new map type > Use the `BOOST\_CGI\_DETAIL\_MAP\_ACCESS` macro in `basic\_request<>`, next to the other uses of it.
+
+
+[endsect]
+
+
+
+[section:vars_ common::request_base::impl_base::vars_]
+
+[indexterm2 vars_..common::request_base::impl_base]
+
+ var_map_type vars_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:common__request_service common::request_service]
+
+The generic service class for basic_request<>s.
+
+ template<
+ typename Protocol >
+ class request_service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__request_service.impl_type [*impl_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__request_service.implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__request_service.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__request_service.async_load [*async_load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_service.load [*load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_service.null [*null]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_service.request_service [*request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_service.set_header [*set_header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__request_service.id [*id]]]
+ []
+ ]
+
+]
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+
+[section:async_load common::request_service::async_load]
+
+[indexterm2 async_load..common::request_service]
+
+ template<
+ typename Handler >
+ void async_load(
+ impl_type & impl,
+ bool parse_stdin,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:construct common::request_service::construct]
+
+[indexterm2 construct..common::request_service]
+
+ void construct(
+ impl_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:destroy common::request_service::destroy]
+
+[indexterm2 destroy..common::request_service]
+
+ void destroy(
+ impl_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:id common::request_service::id]
+
+[indexterm2 id..common::request_service]
+
+ static boost::asio::detail::service_id< request_service< Protocol > > id;
+
+
+
+[endsect]
+
+
+
+[section:impl_type common::request_service::impl_type]
+
+[indexterm2 impl_type..common::request_service]
+
+ typedef service_impl_type::impl_type impl_type;
+
+
+
+
+[endsect]
+
+
+
+[section:implementation_type common::request_service::implementation_type]
+
+[indexterm2 implementation_type..common::request_service]
+
+ typedef service_impl_type::implementation_type implementation_type;
+
+
+
+
+[endsect]
+
+
+
+[section:is_open common::request_service::is_open]
+
+[indexterm2 is_open..common::request_service]
+
+ bool is_open(
+ impl_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:load common::request_service::load]
+
+[indexterm2 load..common::request_service]
+
+ boost::system::error_code & load(
+ impl_type & impl,
+ bool parse_stdin,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:null common::request_service::null]
+
+[indexterm2 null..common::request_service]
+
+ impl_type null() const;
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type common::request_service::protocol_service_type]
+
+[indexterm2 protocol_service_type..common::request_service]
+
+ typedef common::basic_protocol_service< Protocol > protocol_service_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.ios_provider_type [*ios_provider_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.queue_type [*queue_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.set_type [*set_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.traits [*traits]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.basic_protocol_service [*basic_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.dispatch [*dispatch]]]
+ [Dispatch a handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.io_service [*io_service]]]
+ [Return an available io_service from the IoServiceProvider. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.post [*post]]]
+ [Post the handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.reset [*reset]]]
+ [Reset all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.run [*run]]]
+ [Run all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.stop [*stop]]]
+ [Stop all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service._basic_protocol_service [*~basic_protocol_service]]]
+ []
+ ]
+
+]
+
+Holds the request queue and the connection queue. It is also a wrapper around asio::io\_service
+
+
+
+[endsect]
+
+
+
+[section:protocol_type common::request_service::protocol_type]
+
+[indexterm2 protocol_type..common::request_service]
+
+ typedef Protocol protocol_type;
+
+
+
+
+[endsect]
+
+
+[section:request_service common::request_service::request_service]
+
+[indexterm2 request_service..common::request_service]
+
+ ``[link cgi.reference.common__request_service.request_service.overload1 request_service]``(
+ protocol_service_type & ps);
+
+ ``[link cgi.reference.common__request_service.request_service.overload2 request_service]``(
+ ::cgi::common::io_service & ios);
+
+
+[section:overload1 common::request_service::request_service (1 of 2 overloads)]
+
+
+
+ request_service(
+ protocol_service_type & ps);
+
+
+
+[endsect]
+
+
+
+[section:overload2 common::request_service::request_service (2 of 2 overloads)]
+
+
+
+ request_service(
+ ::cgi::common::io_service & ios);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:set_header common::request_service::set_header]
+
+[indexterm2 set_header..common::request_service]
+
+ boost::system::error_code & set_header(
+ impl_type & impl,
+ const std::string & name,
+ const std::string & value,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service common::request_service::shutdown_service]
+
+[indexterm2 shutdown_service..common::request_service]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:common__request_status common::request_status]
+
+[indexterm1 common::request_status]
+
+ enum request_status
+
+[heading Values]
+[variablelist
+
+ [
+ [null]
+ []
+ ]
+
+ [
+ [unloaded]
+ []
+ ]
+
+ [
+ [activated]
+ []
+ ]
+
+ [
+ [accepted]
+ []
+ ]
+
+ [
+ [env_read]
+ []
+ ]
+
+ [
+ [loaded]
+ []
+ ]
+
+ [
+ [ok]
+ []
+ ]
+
+ [
+ [aborted]
+ []
+ ]
+
+ [
+ [closed]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:common__scgi_ common::scgi_]
+
+SCGI (note, this must be removed).
+
+ struct scgi_
+
+
+
+[endsect]
+
+
+[section:common__session_data_type common::session_data_type]
+
+[indexterm1 common::session_data_type]
+
+ enum session_data_type
+
+[heading Values]
+[variablelist
+
+ [
+ [session]
+ []
+ ]
+
+ [
+ [session_data]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:common__tags__acgi common::tags::acgi]
+
+
+
+ struct acgi
+
+
+
+[endsect]
+
+[section:common__tags__async_cgi common::tags::async_cgi]
+
+
+
+ struct async_cgi
+
+
+
+[endsect]
+
+[section:common__tags__async_stdio common::tags::async_stdio]
+
+
+
+ struct async_stdio
+
+
+
+[endsect]
+
+[section:common__tags__cgi common::tags::cgi]
+
+
+
+ struct cgi
+
+
+
+[endsect]
+
+[section:common__tags__fcgi common::tags::fcgi]
+
+
+
+ struct fcgi
+
+
+
+[endsect]
+
+[section:common__tags__null common::tags::null]
+
+
+
+ struct null
+
+
+
+[endsect]
+
+[section:common__tags__round_robin common::tags::round_robin]
+
+
+
+ struct round_robin
+
+
+
+[endsect]
+
+[section:common__tags__scgi common::tags::scgi]
+
+
+
+ struct scgi
+
+
+
+[endsect]
+
+[section:common__tags__service_pool common::tags::service_pool]
+
+
+
+ struct service_pool
+
+
+
+[endsect]
+
+[section:common__tags__shareable_tcp_socket common::tags::shareable_tcp_socket]
+
+
+
+ struct shareable_tcp_socket
+
+
+
+[endsect]
+
+[section:common__tags__single_service common::tags::single_service]
+
+
+
+ struct single_service
+
+
+
+[endsect]
+
+[section:common__tags__stdio common::tags::stdio]
+
+
+
+ struct stdio
+
+
+
+[endsect]
+
+[section:common__tags__tcp_socket common::tags::tcp_socket]
+
+
+
+ struct tcp_socket
+
+
+
+[endsect]
+
+[section:connection_base connection_base]
+
+Abstract Base Class for all connection types.
+
+ class connection_base
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.connection_base._connection_base [*~connection_base]]]
+ []
+ ]
+
+]
+
+
+[section:_connection_base connection_base::~connection_base]
+
+[indexterm2 ~connection_base..connection_base]
+
+ ~connection_base();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:connections__async_stdio connections::async_stdio]
+
+[indexterm1 connections::async_stdio]
+
+ typedef common::basic_connection< common::tags::async_stdio > async_stdio;
+
+
+
+
+[endsect]
+
+
+
+[section:connections__shareable_tcp connections::shareable_tcp]
+
+[indexterm1 connections::shareable_tcp]
+
+ typedef common::basic_connection< common::tags::shareable_tcp_socket > shareable_tcp;
+
+
+
+
+[endsect]
+
+
+
+[section:connections__stdio connections::stdio]
+
+[indexterm1 connections::stdio]
+
+ typedef common::basic_connection< common::tags::stdio > stdio;
+
+
+
+
+[endsect]
+
+
+
+[section:connections__tcp connections::tcp]
+
+[indexterm1 connections::tcp]
+
+ typedef common::basic_connection< common::tags::tcp_socket > tcp;
+
+
+
+
+[endsect]
+
+
+
+[section:error__fcgi_errors error::fcgi_errors]
+
+[indexterm1 error::fcgi_errors]
+
+ enum fcgi_errors
+
+[heading Values]
+[variablelist
+
+ [
+ [bad_header_type]
+ []
+ ]
+
+ [
+ [bad_request_id]
+ [A packet arrived for a request id that doesn't exist and the packet wasn't a BEGIN_REQUEST record. ]
+ ]
+
+ [
+ [couldnt_write_complete_packet]
+ [When trying to write a packet, the client::write_some() call didn't. ]
+ ]
+
+ [
+ [client_closed]
+ []
+ ]
+
+ [
+ [abort_request_record_recieved_for_invalid_request]
+ []
+ ]
+
+ [
+ [multiplexed_request_incoming]
+ []
+ ]
+
+ [
+ [duplicate_request]
+ []
+ ]
+
+ [
+ [accepting_on_an_open_request]
+ []
+ ]
+
+ [
+ [invalid_socket]
+ []
+ ]
+
+ [
+ [invalid_form_type]
+ []
+ ]
+
+ [
+ [broken_pipe]
+ []
+ ]
+
+ [
+ [bad_read]
+ []
+ ]
+
+ [
+ [bad_write]
+ []
+ ]
+
+ [
+ [client_not_open]
+ []
+ ]
+
+ [
+ [multiplexing_not_supported]
+ []
+ ]
+
+ [
+ [eof]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:fcgi__acceptor fcgi::acceptor]
+
+[indexterm1 fcgi::acceptor] Typedef for common usage (FCGI).
+
+ typedef ::cgi::common::basic_request_acceptor< fcgi_request_acceptor_service<> > acceptor;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.next_layer_type [*next_layer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.port_number_type [*port_number_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_request_acceptor.service_type [*service_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.accept [*accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.assign [*assign]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.async_accept [*async_accept]]]
+ [Asynchronously accept one request. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.basic_request_acceptor [*basic_request_acceptor]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.cancel [*cancel]]]
+ [Cancel all asynchronous operations associated with the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.close [*close]]]
+ [Close the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.is_open [*is_open]]]
+ [Check if the acceptor is open. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.listen [*listen]]]
+ [Set the acceptor to listen. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.native [*native]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.open [*open]]]
+ [Open the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor.protocol_service [*protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_request_acceptor._basic_request_acceptor [*~basic_request_acceptor]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:fcgi__acceptor_service_impl fcgi::acceptor_service_impl]
+
+The service_impl class for FCGI basic_request_acceptor<>s.
+
+ template<
+ typename Protocol_ = ::cgi::common::fcgi_>
+ class acceptor_service_impl
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type [*implementation_type]]]
+ [The unique service identifier. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.accept [*accept]]]
+ [Accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_impl [*acceptor_service_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.assign [*assign]]]
+ [Assign an existing native acceptor to a *socket* acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.async_accept [*async_accept]]]
+ [Asynchronously accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.check_for_waiting_request [*check_for_waiting_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.close [*close]]]
+ [Close the acceptor (not implemented yet). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.default_init [*default_init]]]
+ [Default-initialize the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.get_protocol_service [*get_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.is_open [*is_open]]]
+ [Check if the given implementation is open. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.native [*native]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.open [*open]]]
+ [Open a new *socket* acceptor implementation. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.service [*service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_ [*acceptor_service_]]]
+ [The underlying socket acceptor service. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.id [*id]]]
+ []
+ ]
+
+]
+
+Note: this is near enough to being generic. It will hopefully translate directly to the fcgi\_acceptor\_service\_impl. In other words you would then have one acceptor\_service\_impl<>, so you'd use acceptor\_service\_impl<scgi> acceptor\_service\_impl\_; // and acceptor\_service\_impl<fcgi> acceptor\_service\_impl\_; // etc...
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+
+[section:accept fcgi::acceptor_service_impl::accept]
+
+[indexterm2 accept..fcgi::acceptor_service_impl] Accepts one request.
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ endpoint_type * endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:acceptor_service_ fcgi::acceptor_service_impl::acceptor_service_]
+
+[indexterm2 acceptor_service_..fcgi::acceptor_service_impl] The underlying socket acceptor service.
+
+ acceptor_service_type & acceptor_service_;
+
+
+
+[endsect]
+
+
+
+[section:acceptor_service_impl fcgi::acceptor_service_impl::acceptor_service_impl]
+
+[indexterm2 acceptor_service_impl..fcgi::acceptor_service_impl]
+
+ acceptor_service_impl(
+ ::cgi::common::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:acceptor_service_type fcgi::acceptor_service_impl::acceptor_service_type]
+
+[indexterm2 acceptor_service_type..fcgi::acceptor_service_impl]
+
+ typedef type::implementation_type::acceptor_service_type acceptor_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:assign fcgi::acceptor_service_impl::assign]
+
+[indexterm2 assign..fcgi::acceptor_service_impl] Assign an existing native acceptor to a *socket* acceptor.
+
+ boost::system::error_code assign(
+ implementation_type & impl,
+ const native_protocol_type & protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:async_accept fcgi::acceptor_service_impl::async_accept]
+
+[indexterm2 async_accept..fcgi::acceptor_service_impl] Asynchronously accepts one request.
+
+ template<
+ typename Handler >
+ void async_accept(
+ implementation_type & impl,
+ typename implementation_type::request_type & request,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:bind fcgi::acceptor_service_impl::bind]
+
+[indexterm2 bind..fcgi::acceptor_service_impl]
+
+ template<
+ typename Endpoint >
+ boost::system::error_code bind(
+ implementation_type & impl,
+ const Endpoint & endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:check_for_waiting_request fcgi::acceptor_service_impl::check_for_waiting_request]
+
+[indexterm2 check_for_waiting_request..fcgi::acceptor_service_impl]
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Handler >
+ int check_for_waiting_request(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:close fcgi::acceptor_service_impl::close]
+
+[indexterm2 close..fcgi::acceptor_service_impl] Close the acceptor (not implemented yet).
+
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:construct fcgi::acceptor_service_impl::construct]
+
+[indexterm2 construct..fcgi::acceptor_service_impl]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:default_init fcgi::acceptor_service_impl::default_init]
+
+[indexterm2 default_init..fcgi::acceptor_service_impl] Default-initialize the acceptor.
+
+ boost::system::error_code default_init(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:destroy fcgi::acceptor_service_impl::destroy]
+
+[indexterm2 destroy..fcgi::acceptor_service_impl]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type fcgi::acceptor_service_impl::endpoint_type]
+
+[indexterm2 endpoint_type..fcgi::acceptor_service_impl]
+
+ typedef type::implementation_type::endpoint_type endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:get_protocol_service fcgi::acceptor_service_impl::get_protocol_service]
+
+[indexterm2 get_protocol_service..fcgi::acceptor_service_impl]
+
+ protocol_service_type & get_protocol_service(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:id fcgi::acceptor_service_impl::id]
+
+[indexterm2 id..fcgi::acceptor_service_impl]
+
+ static boost::asio::detail::service_id< ::cgi::fcgi::acceptor_service_impl< Protocol_ > > id;
+
+
+
+[endsect]
+
+
+
+[section:is_cgi fcgi::acceptor_service_impl::is_cgi]
+
+[indexterm2 is_cgi..fcgi::acceptor_service_impl]
+
+ bool is_cgi(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:is_open fcgi::acceptor_service_impl::is_open]
+
+[indexterm2 is_open..fcgi::acceptor_service_impl] Check if the given implementation is open.
+
+ bool is_open(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:listen fcgi::acceptor_service_impl::listen]
+
+[indexterm2 listen..fcgi::acceptor_service_impl]
+
+ boost::system::error_code listen(
+ implementation_type & impl,
+ int backlog,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:local_endpoint fcgi::acceptor_service_impl::local_endpoint]
+
+[indexterm2 local_endpoint..fcgi::acceptor_service_impl]
+
+ implementation_type::endpoint_type local_endpoint(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:native fcgi::acceptor_service_impl::native]
+
+[indexterm2 native..fcgi::acceptor_service_impl]
+
+ native_type native(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:native_protocol_type fcgi::acceptor_service_impl::native_protocol_type]
+
+[indexterm2 native_protocol_type..fcgi::acceptor_service_impl]
+
+ typedef type::implementation_type::native_protocol_type native_protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:native_type fcgi::acceptor_service_impl::native_type]
+
+[indexterm2 native_type..fcgi::acceptor_service_impl]
+
+ typedef acceptor_service_type::native_type native_type;
+
+
+
+
+[endsect]
+
+
+
+[section:open fcgi::acceptor_service_impl::open]
+
+[indexterm2 open..fcgi::acceptor_service_impl] Open a new *socket* acceptor implementation.
+
+ boost::system::error_code open(
+ implementation_type & impl,
+ const native_protocol_type & protocol,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type fcgi::acceptor_service_impl::protocol_service_type]
+
+[indexterm2 protocol_service_type..fcgi::acceptor_service_impl]
+
+ typedef type::implementation_type::protocol_service_type protocol_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type fcgi::acceptor_service_impl::protocol_type]
+
+[indexterm2 protocol_type..fcgi::acceptor_service_impl]
+
+ typedef type::implementation_type::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:service fcgi::acceptor_service_impl::service]
+
+[indexterm2 service..fcgi::acceptor_service_impl]
+
+ protocol_service_type & service(
+ implementation_type const & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:set_protocol_service fcgi::acceptor_service_impl::set_protocol_service]
+
+[indexterm2 set_protocol_service..fcgi::acceptor_service_impl]
+
+ void set_protocol_service(
+ implementation_type & impl,
+ protocol_service_type & ps);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service fcgi::acceptor_service_impl::shutdown_service]
+
+[indexterm2 shutdown_service..fcgi::acceptor_service_impl]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[section:type fcgi::acceptor_service_impl::type]
+
+[indexterm2 type..fcgi::acceptor_service_impl]
+
+ typedef acceptor_service_impl< Protocol_ > type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type [*implementation_type]]]
+ [The unique service identifier. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.accept [*accept]]]
+ [Accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_impl [*acceptor_service_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.assign [*assign]]]
+ [Assign an existing native acceptor to a *socket* acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.async_accept [*async_accept]]]
+ [Asynchronously accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.check_for_waiting_request [*check_for_waiting_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.close [*close]]]
+ [Close the acceptor (not implemented yet). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.default_init [*default_init]]]
+ [Default-initialize the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.get_protocol_service [*get_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.is_open [*is_open]]]
+ [Check if the given implementation is open. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.native [*native]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.open [*open]]]
+ [Open a new *socket* acceptor implementation. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.service [*service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_ [*acceptor_service_]]]
+ [The underlying socket acceptor service. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.id [*id]]]
+ []
+ ]
+
+]
+
+Note: this is near enough to being generic. It will hopefully translate directly to the fcgi\_acceptor\_service\_impl. In other words you would then have one acceptor\_service\_impl<>, so you'd use acceptor\_service\_impl<scgi> acceptor\_service\_impl\_; // and acceptor\_service\_impl<fcgi> acceptor\_service\_impl\_; // etc...
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__acceptor_service_impl__implementation_type fcgi::acceptor_service_impl::implementation_type]
+
+The unique service identifier.
+
+ struct implementation_type
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.port_number_type [*port_number_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.request_type [*request_type]]]
+ []
+
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.acceptor_ [*acceptor_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.endpoint_ [*endpoint_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.mutex_ [*mutex_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.port_num_ [*port_num_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.service_ [*service_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.waiting_requests_ [*waiting_requests_]]]
+ []
+ ]
+
+]
+
+
+[section:acceptor_ fcgi::acceptor_service_impl::implementation_type::acceptor_]
+
+[indexterm2 acceptor_..fcgi::acceptor_service_impl::implementation_type]
+
+ acceptor_service_type::implementation_type acceptor_;
+
+
+
+[endsect]
+
+
+
+[section:acceptor_service_type fcgi::acceptor_service_impl::implementation_type::acceptor_service_type]
+
+[indexterm2 acceptor_service_type..fcgi::acceptor_service_impl::implementation_type]
+
+ typedef boost::asio::socket_acceptor_service< native_protocol_type > acceptor_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:endpoint_ fcgi::acceptor_service_impl::implementation_type::endpoint_]
+
+[indexterm2 endpoint_..fcgi::acceptor_service_impl::implementation_type]
+
+ endpoint_type endpoint_;
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type fcgi::acceptor_service_impl::implementation_type::endpoint_type]
+
+[indexterm2 endpoint_type..fcgi::acceptor_service_impl::implementation_type]
+
+ typedef boost::asio::ip::tcp::endpoint endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:mutex_ fcgi::acceptor_service_impl::implementation_type::mutex_]
+
+[indexterm2 mutex_..fcgi::acceptor_service_impl::implementation_type]
+
+ boost::mutex mutex_;
+
+
+
+[endsect]
+
+
+
+[section:native_protocol_type fcgi::acceptor_service_impl::implementation_type::native_protocol_type]
+
+[indexterm2 native_protocol_type..fcgi::acceptor_service_impl::implementation_type]
+
+ typedef boost::asio::ip::tcp native_protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:port_num_ fcgi::acceptor_service_impl::implementation_type::port_num_]
+
+[indexterm2 port_num_..fcgi::acceptor_service_impl::implementation_type]
+
+ port_number_type port_num_;
+
+
+
+[endsect]
+
+
+
+[section:port_number_type fcgi::acceptor_service_impl::implementation_type::port_number_type]
+
+[indexterm2 port_number_type..fcgi::acceptor_service_impl::implementation_type]
+
+ typedef unsigned short port_number_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type fcgi::acceptor_service_impl::implementation_type::protocol_service_type]
+
+[indexterm2 protocol_service_type..fcgi::acceptor_service_impl::implementation_type]
+
+ typedef common::basic_protocol_service< protocol_type > protocol_service_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.ios_provider_type [*ios_provider_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.queue_type [*queue_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.set_type [*set_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.traits [*traits]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.basic_protocol_service [*basic_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.dispatch [*dispatch]]]
+ [Dispatch a handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.io_service [*io_service]]]
+ [Return an available io_service from the IoServiceProvider. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.post [*post]]]
+ [Post the handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.reset [*reset]]]
+ [Reset all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.run [*run]]]
+ [Run all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.stop [*stop]]]
+ [Stop all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service._basic_protocol_service [*~basic_protocol_service]]]
+ []
+ ]
+
+]
+
+Holds the request queue and the connection queue. It is also a wrapper around asio::io\_service
+
+
+
+[endsect]
+
+
+
+[section:protocol_type fcgi::acceptor_service_impl::implementation_type::protocol_type]
+
+[indexterm2 protocol_type..fcgi::acceptor_service_impl::implementation_type]
+
+ typedef Protocol_ protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_type fcgi::acceptor_service_impl::implementation_type::request_type]
+
+[indexterm2 request_type..fcgi::acceptor_service_impl::implementation_type]
+
+ typedef fcgi::request request_type;
+
+
+
+
+[endsect]
+
+
+
+[section:service_ fcgi::acceptor_service_impl::implementation_type::service_]
+
+[indexterm2 service_..fcgi::acceptor_service_impl::implementation_type]
+
+ protocol_service_type * service_;
+
+
+
+[endsect]
+
+
+
+[section:waiting_requests_ fcgi::acceptor_service_impl::implementation_type::waiting_requests_]
+
+[indexterm2 waiting_requests_..fcgi::acceptor_service_impl::implementation_type]
+
+ std::queue< boost::shared_ptr< request_type > > waiting_requests_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:fcgi__client fcgi::client]
+
+[indexterm1 fcgi::client]
+
+ typedef common::basic_client< connections::shareable_tcp,::cgi::common::fcgi_ > client;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_ptr [*connection_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.async_read_some [*async_read_some]]]
+ [Asynchronously read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.async_write_some [*async_write_some]]]
+ [Asynchronously write some data to the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.basic_client [*basic_client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left [*bytes_left]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.connection [*connection]]]
+ [Get a shared_ptr of the connection associated with the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.read_some [*read_some]]]
+ [Read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.set_connection [*set_connection]]]
+ [Associate a connection with this client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.write_some [*write_some]]]
+ [Write some data to the client. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left_ [*bytes_left_]]]
+ []
+ ]
+
+]
+
+A client is for two things: 1. To hold a full-duplex connection (or separate input and output connections). 2. To hold any protocol-specific data about the request. For now, this means the internal 'request number' associated by FastCGI with each request (ie. so incoming/outgoing packets can be wrapped with data noting what request it relates to). 3. Buffering. Not sure about how far this should go yet, but probably no further than minimal buffering. 4. Share a connection. Since a multiplexing connection is shared between multiple clients, the client should be responsible for taking possesion of the connection for a period of time (so it can write a complete packet). This idea could be taken quite far into genericity by making clients aware of how busy the connection is and size its output packets accordingly... But I'm not doing that.
+
+
+
+[endsect]
+
+
+[section:fcgi__fcgi_request_service fcgi::fcgi_request_service]
+
+The IoObjectService class for a FCGI basic_request<>s.
+
+ class fcgi_request_service :
+ public common::request_base< fcgi_request_service >
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__callback_functor [*callback_functor]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type [*implementation_type]]]
+ [The actual implementation date for an FCGI request. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.full_type [*full_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.proc_func_t [*proc_func_t]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.async_load [*async_load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.begin_request_helper [*begin_request_helper]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.clear [*clear]]]
+ [Clear all request data (object is then safe to remove). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.client [*client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.close [*close]]]
+ [Close the request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.fcgi_request_service [*fcgi_request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.handle_admin_request [*handle_admin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.handle_other_request_header [*handle_other_request_header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.params_read [*params_read]]]
+ [Returns true if the request environment params have been read. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_body [*parse_body]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_header [*parse_header]]]
+ [Parse the current header. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_packet [*parse_packet]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_abort_request [*process_abort_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_begin_request [*process_begin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_params [*process_params]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_stdin [*process_stdin]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_body [*read_body]]]
+ [Read the body of the current packet; do nothing with it. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_env_vars [*read_env_vars]]]
+ [Read in the FastCGI (env) params. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_header [*read_header]]]
+ [Read a single header, buf do nothing with it. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.set_service [*set_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.set_status [*set_status]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service._fcgi_request_service [*~fcgi_request_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_one_post_var [*parse_one_post_var]]]
+ [Read and parse a single cgi POST meta variable (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.id [*id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.proc_funcs [*proc_funcs]]]
+ []
+ ]
+
+]
+
+
+[section:async_load fcgi::fcgi_request_service::async_load]
+
+[indexterm2 async_load..fcgi::fcgi_request_service]
+
+ template<
+ typename Handler >
+ void async_load(
+ implementation_type & impl,
+ bool parse_stdin,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:clear fcgi::fcgi_request_service::clear]
+
+[indexterm2 clear..fcgi::fcgi_request_service] Clear all request data (object is then safe to remove).
+
+ void clear(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:client fcgi::fcgi_request_service::client]
+
+[indexterm2 client..fcgi::fcgi_request_service]
+
+ implementation_type::client_type & client(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+[section:close fcgi::fcgi_request_service::close]
+
+[indexterm2 close..fcgi::fcgi_request_service] Close the request.
+
+ int ``[link cgi.reference.fcgi__fcgi_request_service.close.overload1 close]``(
+ implementation_type & impl,
+ ::cgi::common::http::status_code & hsc,
+ int program_status,
+ boost::system::error_code & ec);
+
+ int ``[link cgi.reference.fcgi__fcgi_request_service.close.overload2 close]``(
+ implementation_type & impl,
+ ::cgi::common::http::status_code & hsc,
+ int program_status);
+
+
+[section:overload1 fcgi::fcgi_request_service::close (1 of 2 overloads)]
+
+Close the request.
+
+ int close(
+ implementation_type & impl,
+ ::cgi::common::http::status_code & hsc,
+ int program_status,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::fcgi_request_service::close (2 of 2 overloads)]
+
+Close the request.
+
+ int close(
+ implementation_type & impl,
+ ::cgi::common::http::status_code & hsc,
+ int program_status);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:construct fcgi::fcgi_request_service::construct]
+
+[indexterm2 construct..fcgi::fcgi_request_service]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:destroy fcgi::fcgi_request_service::destroy]
+
+[indexterm2 destroy..fcgi::fcgi_request_service]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:fcgi_request_service fcgi::fcgi_request_service::fcgi_request_service]
+
+[indexterm2 fcgi_request_service..fcgi::fcgi_request_service]
+
+ fcgi_request_service(
+ ::cgi::common::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:full_type fcgi::fcgi_request_service::full_type]
+
+[indexterm2 full_type..fcgi::fcgi_request_service]
+
+ typedef fcgi_request_service full_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__callback_functor [*callback_functor]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type [*implementation_type]]]
+ [The actual implementation date for an FCGI request. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.full_type [*full_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.proc_func_t [*proc_func_t]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.async_load [*async_load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.begin_request_helper [*begin_request_helper]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.clear [*clear]]]
+ [Clear all request data (object is then safe to remove). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.client [*client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.close [*close]]]
+ [Close the request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.fcgi_request_service [*fcgi_request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.handle_admin_request [*handle_admin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.handle_other_request_header [*handle_other_request_header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.params_read [*params_read]]]
+ [Returns true if the request environment params have been read. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_body [*parse_body]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_header [*parse_header]]]
+ [Parse the current header. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_packet [*parse_packet]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_abort_request [*process_abort_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_begin_request [*process_begin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_params [*process_params]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_stdin [*process_stdin]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_body [*read_body]]]
+ [Read the body of the current packet; do nothing with it. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_env_vars [*read_env_vars]]]
+ [Read in the FastCGI (env) params. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_header [*read_header]]]
+ [Read a single header, buf do nothing with it. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.set_service [*set_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.set_status [*set_status]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service._fcgi_request_service [*~fcgi_request_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_one_post_var [*parse_one_post_var]]]
+ [Read and parse a single cgi POST meta variable (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.id [*id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.proc_funcs [*proc_funcs]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:get_role fcgi::fcgi_request_service::get_role]
+
+[indexterm2 get_role..fcgi::fcgi_request_service]
+
+ role_type get_role(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:handle_admin_request fcgi::fcgi_request_service::handle_admin_request]
+
+[indexterm2 handle_admin_request..fcgi::fcgi_request_service]
+
+ void handle_admin_request(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:handle_other_request_header fcgi::fcgi_request_service::handle_other_request_header]
+
+[indexterm2 handle_other_request_header..fcgi::fcgi_request_service]
+
+ void handle_other_request_header(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:id fcgi::fcgi_request_service::id]
+
+[indexterm2 id..fcgi::fcgi_request_service]
+
+ static boost::asio::detail::service_id< fcgi_request_service > id;
+
+
+
+[endsect]
+
+
+
+[section:is_file fcgi::fcgi_request_service::is_file]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 is_file..fcgi::fcgi_request_service] Check if a given POST variable represents a file upload.
+
+ bool is_file(
+ ImplType & impl,
+ typename ImplType::string_type const & key);
+
+
+
+[endsect]
+
+
+
+[section:is_open fcgi::fcgi_request_service::is_open]
+
+[indexterm2 is_open..fcgi::fcgi_request_service]
+
+ bool is_open(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+[section:load fcgi::fcgi_request_service::load]
+
+[indexterm2 load..fcgi::fcgi_request_service] Synchronously read/parse the request meta-data.
+
+ boost::system::error_code ``[link cgi.reference.fcgi__fcgi_request_service.load.overload1 load]``(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+ boost::system::error_code ``[link cgi.reference.fcgi__fcgi_request_service.load.overload2 load]``(
+ implementation_type & impl,
+ common::parse_options opts,
+ boost::system::error_code & ec);
+
+
+[section:overload1 fcgi::fcgi_request_service::load (1 of 2 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Synchronously read/parse the request meta-data.
+
+ boost::system::error_code load(
+ ImplType & impl,
+ common::parse_options parse_opts,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::fcgi_request_service::load (2 of 2 overloads)]
+
+Load the request to a point where it can be usefully used.
+
+ boost::system::error_code load(
+ implementation_type & impl,
+ common::parse_options opts,
+ boost::system::error_code & ec);
+
+
+FastCGI: --------
+
+
+* Calls client::construct() to claim a request id from the server.
+
+* Reads, parses and handles all packets until the closing `PARAMS` packet for this request arrives from the server.
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:load_environment fcgi::fcgi_request_service::load_environment]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 load_environment..fcgi::fcgi_request_service] Load the base_environment into the current environment.
+
+ void load_environment(
+ ImplType & impl,
+ char ** base_environment,
+ bool is_command_line);
+
+
+Parsed the base\_environment and add it to the current request's environment. This overwrites any environment variables with the existing key.
+
+If `is\_command\_line` is true, then the first argument is skipped as this is the name of the program and ignored. Using it actually causes a crash on Windows (MSVC 9) anyway: I'm not exactly sure why.
+
+
+[endsect]
+
+
+
+[section:params_read fcgi::fcgi_request_service::params_read]
+
+[indexterm2 params_read..fcgi::fcgi_request_service] Returns true if the request environment params have been read.
+
+ bool params_read(
+ implementation_type & impl);
+
+
+Check if the params have been read (ie. FCGI\_PARAMS packets).
+
+
+[endsect]
+
+
+
+[section:parse_body fcgi::fcgi_request_service::parse_body]
+
+[indexterm2 parse_body..fcgi::fcgi_request_service]
+
+ template<
+ typename MutableBuffersType >
+ boost::system::error_code parse_body(
+ implementation_type & impl,
+ const MutableBuffersType & buffer,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_cookie_vars fcgi::fcgi_request_service::parse_cookie_vars]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 parse_cookie_vars..fcgi::fcgi_request_service] Read and parse the HTTP_COOKIE meta variable.
+
+ boost::system::error_code parse_cookie_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_get_vars fcgi::fcgi_request_service::parse_get_vars]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 parse_get_vars..fcgi::fcgi_request_service] Read and parse the cgi GET meta variables.
+
+ boost::system::error_code parse_get_vars(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_header fcgi::fcgi_request_service::parse_header]
+
+[indexterm2 parse_header..fcgi::fcgi_request_service] Parse the current header.
+
+ boost::tribool parse_header(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:parse_one_post_var fcgi::fcgi_request_service::parse_one_post_var]
+
+[indexterm2 parse_one_post_var..fcgi::fcgi_request_service] Read and parse a single cgi POST meta variable (greedily).
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code & parse_one_post_var(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_packet fcgi::fcgi_request_service::parse_packet]
+
+[indexterm2 parse_packet..fcgi::fcgi_request_service]
+
+ boost::system::error_code parse_packet(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_post_vars fcgi::fcgi_request_service::parse_post_vars]
+
+[indexterm2 parse_post_vars..fcgi::fcgi_request_service] Read and parse the cgi POST meta variables (greedily).
+
+ boost::system::error_code & parse_post_vars(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:proc_func_t fcgi::fcgi_request_service::proc_func_t]
+
+[indexterm2 proc_func_t..fcgi::fcgi_request_service]
+
+ typedef boost::system::error_code(full_type::* proc_func_t;
+
+
+
+
+[endsect]
+
+
+
+[section:proc_funcs fcgi::fcgi_request_service::proc_funcs]
+
+[indexterm2 proc_funcs..fcgi::fcgi_request_service]
+
+ static const proc_func_t proc_funcs =
+ { 0
+ , &fcgi_request_service::process_begin_request
+ , &fcgi_request_service::process_abort_request
+ , 0
+ , &fcgi_request_service::process_params
+ , &fcgi_request_service::process_stdin
+ , 0
+ , 0
+ };
+
+
+
+[endsect]
+
+
+
+[section:process_abort_request fcgi::fcgi_request_service::process_abort_request]
+
+[indexterm2 process_abort_request..fcgi::fcgi_request_service]
+
+ boost::system::error_code process_abort_request(
+ implementation_type & impl,
+ boost::uint16_t id,
+ const unsigned char * buf,
+ boost::uint32_t ,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:process_begin_request fcgi::fcgi_request_service::process_begin_request]
+
+[indexterm2 process_begin_request..fcgi::fcgi_request_service]
+
+ boost::system::error_code process_begin_request(
+ implementation_type & impl,
+ boost::uint16_t id,
+ const unsigned char * buf,
+ boost::uint32_t ,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:process_params fcgi::fcgi_request_service::process_params]
+
+[indexterm2 process_params..fcgi::fcgi_request_service]
+
+ boost::system::error_code process_params(
+ implementation_type & impl,
+ boost::uint16_t id,
+ const unsigned char * buf,
+ boost::uint32_t len,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:process_stdin fcgi::fcgi_request_service::process_stdin]
+
+[indexterm2 process_stdin..fcgi::fcgi_request_service]
+
+ boost::system::error_code process_stdin(
+ implementation_type & impl,
+ boost::uint16_t id,
+ const unsigned char * buf,
+ boost::uint32_t len,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type fcgi::fcgi_request_service::protocol_type]
+
+[indexterm2 protocol_type..fcgi::fcgi_request_service]
+
+ typedef self_type::implementation_type::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:read_body fcgi::fcgi_request_service::read_body]
+
+[indexterm2 read_body..fcgi::fcgi_request_service] Read the body of the current packet; do nothing with it.
+
+ template<
+ typename MutableBuffersType >
+ boost::system::error_code read_body(
+ implementation_type & impl,
+ const MutableBuffersType & buffer,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:read_env_vars fcgi::fcgi_request_service::read_env_vars]
+
+[indexterm2 read_env_vars..fcgi::fcgi_request_service] Read in the FastCGI (env) params.
+
+ boost::system::error_code read_env_vars(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:read_header fcgi::fcgi_request_service::read_header]
+
+[indexterm2 read_header..fcgi::fcgi_request_service] Read a single header, buf do nothing with it.
+
+ boost::system::error_code read_header(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+Read a single header, but do nothing with it.
+
+
+[endsect]
+
+
+[section:read_some fcgi::fcgi_request_service::read_some]
+
+[indexterm2 read_some..fcgi::fcgi_request_service] Read some data from the client into the supplied buffer.
+
+ std::size_t ``[link cgi.reference.fcgi__fcgi_request_service.read_some.overload1 read_some]``(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ std::size_t ``[link cgi.reference.fcgi__fcgi_request_service.read_some.overload2 read_some]``(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t ``[link cgi.reference.fcgi__fcgi_request_service.read_some.overload3 read_some]``(
+ implementation_type & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+ std::size_t ``[link cgi.reference.fcgi__fcgi_request_service.read_some.overload4 read_some]``(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+[section:overload1 fcgi::fcgi_request_service::read_some (1 of 4 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Read some data from the client into the supplied buffer.
+
+ std::size_t read_some(
+ ImplType & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::fcgi_request_service::read_some (2 of 4 overloads)]
+
+
+['Inherited from common::request_base.]
+
+Read some data into the internal buffer.
+
+ std::size_t read_some(
+ ImplType & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload3 fcgi::fcgi_request_service::read_some (3 of 4 overloads)]
+
+Read some data from the client into the supplied buffer.
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ implementation_type & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+Read some data from the client.
+
+
+[endsect]
+
+
+
+[section:overload4 fcgi::fcgi_request_service::read_some (4 of 4 overloads)]
+
+Read some data from the client into the internal buffer.
+
+ std::size_t read_some(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:request_id fcgi::fcgi_request_service::request_id]
+
+
+['Inherited from common::request_base.]
+
+[indexterm2 request_id..fcgi::fcgi_request_service] Get the request ID of a FastCGI request, or 1.
+
+ boost::uint16_t const & request_id(
+ ImplType & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:request_type fcgi::fcgi_request_service::request_type]
+
+[indexterm2 request_type..fcgi::fcgi_request_service]
+
+ typedef self_type::implementation_type::request_type request_type;
+
+
+
+
+[endsect]
+
+
+
+[section:self_type fcgi::fcgi_request_service::self_type]
+
+[indexterm2 self_type..fcgi::fcgi_request_service]
+
+ typedef fcgi_request_service self_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__callback_functor [*callback_functor]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type [*implementation_type]]]
+ [The actual implementation date for an FCGI request. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.full_type [*full_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.proc_func_t [*proc_func_t]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.async_load [*async_load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.begin_request_helper [*begin_request_helper]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.clear [*clear]]]
+ [Clear all request data (object is then safe to remove). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.client [*client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.close [*close]]]
+ [Close the request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.fcgi_request_service [*fcgi_request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.handle_admin_request [*handle_admin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.handle_other_request_header [*handle_other_request_header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.params_read [*params_read]]]
+ [Returns true if the request environment params have been read. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_body [*parse_body]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_header [*parse_header]]]
+ [Parse the current header. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_packet [*parse_packet]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_abort_request [*process_abort_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_begin_request [*process_begin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_params [*process_params]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_stdin [*process_stdin]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_body [*read_body]]]
+ [Read the body of the current packet; do nothing with it. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_env_vars [*read_env_vars]]]
+ [Read in the FastCGI (env) params. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_header [*read_header]]]
+ [Read a single header, buf do nothing with it. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.set_service [*set_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.set_status [*set_status]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service._fcgi_request_service [*~fcgi_request_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_one_post_var [*parse_one_post_var]]]
+ [Read and parse a single cgi POST meta variable (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.id [*id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.proc_funcs [*proc_funcs]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:set_service fcgi::fcgi_request_service::set_service]
+
+[indexterm2 set_service..fcgi::fcgi_request_service]
+
+ void set_service(
+ implementation_type & impl,
+ implementation_type::protocol_service_type & ps);
+
+
+
+[endsect]
+
+
+
+[section:set_status fcgi::fcgi_request_service::set_status]
+
+[indexterm2 set_status..fcgi::fcgi_request_service]
+
+ void set_status(
+ implementation_type & impl,
+ common::request_status status);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service fcgi::fcgi_request_service::shutdown_service]
+
+[indexterm2 shutdown_service..fcgi::fcgi_request_service]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[section:string_type fcgi::fcgi_request_service::string_type]
+
+[indexterm2 string_type..fcgi::fcgi_request_service]
+
+ typedef self_type::implementation_type::string_type string_type;
+
+
+
+
+[endsect]
+
+
+
+[section:_fcgi_request_service fcgi::fcgi_request_service::~fcgi_request_service]
+
+[indexterm2 ~fcgi_request_service..fcgi::fcgi_request_service]
+
+ ~fcgi_request_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__fcgi_request_service__callback_functor fcgi::fcgi_request_service::callback_functor]
+
+
+
+ template<
+ typename Service >
+ struct callback_functor
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__callback_functor.callback_functor [*callback_functor]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__callback_functor.operator() [*operator()]]]
+ []
+ ]
+
+]
+
+
+[section:callback_functor fcgi::fcgi_request_service::callback_functor::callback_functor]
+
+[indexterm2 callback_functor..fcgi::fcgi_request_service::callback_functor]
+
+ callback_functor(
+ implementation_type & impl,
+ Service * service);
+
+
+
+[endsect]
+
+
+
+[section:operator() fcgi::fcgi_request_service::callback_functor::operator()]
+
+[indexterm2 operator()..fcgi::fcgi_request_service::callback_functor]
+
+ std::size_t operator()(
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__fcgi_request_service__implementation_type fcgi::fcgi_request_service::implementation_type]
+
+The actual implementation date for an FCGI request.
+
+ struct implementation_type :
+ public common::request_base< T >::impl_base
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.buffer_type [*buffer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.char_type [*char_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.client_type [*client_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.form_parser_type [*form_parser_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.header_buffer_type [*header_buffer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.header_type [*header_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.string_type [*string_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.var_map_type [*var_map_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.implementation_type [*implementation_type]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.prepare [*prepare]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.prepare_misc [*prepare_misc]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.all_done_ [*all_done_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.characters_left_ [*characters_left_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.client_ [*client_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.env_parsed_ [*env_parsed_]]]
+ [Whether the environment has been parsed yet. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.form_parts_ [*form_parts_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.fp_ [*fp_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.get_parsed_ [*get_parsed_]]]
+ [Whether the get data has been parsed yet. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.header_ [*header_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.header_buf_ [*header_buf_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.http_status_ [*http_status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.id_ [*id_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.param_buffer_ [*param_buffer_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.post_buffer_ [*post_buffer_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.request_role_ [*request_role_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.request_status_ [*request_status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.service_ [*service_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.stdin_parsed_ [*stdin_parsed_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type.vars_ [*vars_]]]
+ []
+ ]
+
+]
+
+
+[section:all_done_ fcgi::fcgi_request_service::implementation_type::all_done_]
+
+[indexterm2 all_done_..fcgi::fcgi_request_service::implementation_type]
+
+ bool all_done_;
+
+
+
+[endsect]
+
+
+
+[section:buffer_type fcgi::fcgi_request_service::implementation_type::buffer_type]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 buffer_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef string_type buffer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:char_type fcgi::fcgi_request_service::implementation_type::char_type]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 char_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef char char_type;
+
+
+
+
+[endsect]
+
+
+
+[section:characters_left_ fcgi::fcgi_request_service::implementation_type::characters_left_]
+
+[indexterm2 characters_left_..fcgi::fcgi_request_service::implementation_type]
+
+ std::size_t characters_left_;
+
+
+
+[endsect]
+
+
+
+[section:client_ fcgi::fcgi_request_service::implementation_type::client_]
+
+[indexterm2 client_..fcgi::fcgi_request_service::implementation_type]
+
+ client_type client_;
+
+
+
+[endsect]
+
+
+
+[section:client_type fcgi::fcgi_request_service::implementation_type::client_type]
+
+[indexterm2 client_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef ::cgi::fcgi::client client_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_ptr [*connection_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_client.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.async_read_some [*async_read_some]]]
+ [Asynchronously read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.async_write_some [*async_write_some]]]
+ [Asynchronously write some data to the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.basic_client [*basic_client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left [*bytes_left]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.connection [*connection]]]
+ [Get a shared_ptr of the connection associated with the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.read_some [*read_some]]]
+ [Read some data from the client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.set_connection [*set_connection]]]
+ [Associate a connection with this client. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_client.write_some [*write_some]]]
+ [Write some data to the client. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_client.bytes_left_ [*bytes_left_]]]
+ []
+ ]
+
+]
+
+A client is for two things: 1. To hold a full-duplex connection (or separate input and output connections). 2. To hold any protocol-specific data about the request. For now, this means the internal 'request number' associated by FastCGI with each request (ie. so incoming/outgoing packets can be wrapped with data noting what request it relates to). 3. Buffering. Not sure about how far this should go yet, but probably no further than minimal buffering. 4. Share a connection. Since a multiplexing connection is shared between multiple clients, the client should be responsible for taking possesion of the connection for a period of time (so it can write a complete packet). This idea could be taken quite far into genericity by making clients aware of how busy the connection is and size its output packets accordingly... But I'm not doing that.
+
+
+
+[endsect]
+
+
+
+[section:connection_type fcgi::fcgi_request_service::implementation_type::connection_type]
+
+[indexterm2 connection_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef client_type::connection_type connection_type;
+
+
+
+
+[endsect]
+
+
+
+[section:const_buffers_type fcgi::fcgi_request_service::implementation_type::const_buffers_type]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 const_buffers_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef boost::asio::const_buffers_1 const_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:env_parsed_ fcgi::fcgi_request_service::implementation_type::env_parsed_]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 env_parsed_..fcgi::fcgi_request_service::implementation_type] Whether the environment has been parsed yet.
+
+ bool env_parsed_;
+
+
+
+[endsect]
+
+
+
+[section:form_parser_type fcgi::fcgi_request_service::implementation_type::form_parser_type]
+
+[indexterm2 form_parser_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef detail::form_parser form_parser_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.buffer_type [*buffer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.callback_type [*callback_type]]]
+ [The callback functor to read more data. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser__context [*context]]]
+ [The context used for parsing. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.detail__form_parser.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.detail__form_parser.buffer_string [*buffer_string]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.form_parser [*form_parser]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.move_to_start_of_first_part [*move_to_start_of_first_part]]]
+ [Erase any front-cruft on the form data. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse [*parse]]]
+ [Run the parser on the given `context`. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse_boundary_marker [*parse_boundary_marker]]]
+ [Get the boundary marker from the CONTENT_TYPE header. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse_form_part [*parse_form_part]]]
+ [Parse a single form part. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse_multipart_form [*parse_multipart_form]]]
+ [Parse a multipart form. ]
+ ]
+
+ [
+ [[link cgi.reference.detail__form_parser.parse_url_encoded_form [*parse_url_encoded_form]]]
+ [URL-encoded forms. ]
+ ]
+
+]
+
+Construct this and then call `form\_parserparse` with an instance of form_parser::context (or compatible struct).
+
+This is minimal and doesn't extract all meta-data yet, but is known to work on Windows XP with MSVC9.0 and Ubuntu linux with gcc 4.2.x and 4.3.x.
+
+Valid Form Encodings > `application/x-www-form-urlencoded` > `multipart/form-data`
+
+File uploads (ie. in `multipart/form-data` forms) are saved to disk. See the `BOOST\_CGI\_UPLOAD\_DIRECTORY` macro.
+
+Should also work for HTTP POST data.
+
+
+
+[endsect]
+
+
+
+[section:form_parts_ fcgi::fcgi_request_service::implementation_type::form_parts_]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 form_parts_..fcgi::fcgi_request_service::implementation_type]
+
+ std::vector< common::form_part > form_parts_;
+
+
+
+[endsect]
+
+
+
+[section:fp_ fcgi::fcgi_request_service::implementation_type::fp_]
+
+[indexterm2 fp_..fcgi::fcgi_request_service::implementation_type]
+
+ boost::scoped_ptr< form_parser_type > fp_;
+
+
+
+[endsect]
+
+
+
+[section:get_parsed_ fcgi::fcgi_request_service::implementation_type::get_parsed_]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 get_parsed_..fcgi::fcgi_request_service::implementation_type] Whether the get data has been parsed yet.
+
+ bool get_parsed_;
+
+
+
+[endsect]
+
+
+
+[section:header_ fcgi::fcgi_request_service::implementation_type::header_]
+
+[indexterm2 header_..fcgi::fcgi_request_service::implementation_type]
+
+ header_type header_;
+
+
+
+[endsect]
+
+
+
+[section:header_buf_ fcgi::fcgi_request_service::implementation_type::header_buf_]
+
+[indexterm2 header_buf_..fcgi::fcgi_request_service::implementation_type]
+
+ header_buffer_type header_buf_;
+
+
+
+[endsect]
+
+
+
+[section:header_buffer_type fcgi::fcgi_request_service::implementation_type::header_buffer_type]
+
+[indexterm2 header_buffer_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef client_type::header_buffer_type header_buffer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:header_type fcgi::fcgi_request_service::implementation_type::header_type]
+
+[indexterm2 header_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef spec_detail::Header header_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type [*implementation_type]]]
+ [The underlying type of a FastCGI header. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.Header [*Header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.body_length [*body_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.content_length [*content_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.data [*data]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.padding_length [*padding_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.reset [*reset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.type [*type]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.version [*version]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.impl [*impl]]]
+ [The underlying type of a FastCGI header. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:http_status_ fcgi::fcgi_request_service::implementation_type::http_status_]
+
+[indexterm2 http_status_..fcgi::fcgi_request_service::implementation_type]
+
+ ::cgi::common::http::status_code http_status_;
+
+
+
+[endsect]
+
+
+
+[section:id_ fcgi::fcgi_request_service::implementation_type::id_]
+
+[indexterm2 id_..fcgi::fcgi_request_service::implementation_type]
+
+ boost::uint16_t id_;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type fcgi::fcgi_request_service::implementation_type::implementation_type]
+
+[indexterm2 implementation_type..fcgi::fcgi_request_service::implementation_type]
+
+ implementation_type();
+
+
+
+[endsect]
+
+
+
+[section:mutable_buffers_type fcgi::fcgi_request_service::implementation_type::mutable_buffers_type]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 mutable_buffers_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef boost::asio::mutable_buffers_1 mutable_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:param_buffer_ fcgi::fcgi_request_service::implementation_type::param_buffer_]
+
+[indexterm2 param_buffer_..fcgi::fcgi_request_service::implementation_type]
+
+ buffer_type param_buffer_;
+
+
+
+[endsect]
+
+
+
+[section:post_buffer_ fcgi::fcgi_request_service::implementation_type::post_buffer_]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 post_buffer_..fcgi::fcgi_request_service::implementation_type]
+
+ buffer_type post_buffer_;
+
+
+
+[endsect]
+
+
+
+[section:prepare fcgi::fcgi_request_service::implementation_type::prepare]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 prepare..fcgi::fcgi_request_service::implementation_type]
+
+ mutable_buffers_type prepare(
+ std::size_t size);
+
+
+
+[endsect]
+
+
+
+[section:prepare_misc fcgi::fcgi_request_service::implementation_type::prepare_misc]
+
+[indexterm2 prepare_misc..fcgi::fcgi_request_service::implementation_type]
+
+ mutable_buffers_type prepare_misc(
+ std::size_t size);
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type fcgi::fcgi_request_service::implementation_type::protocol_service_type]
+
+[indexterm2 protocol_service_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef detail::protocol_traits< protocol_type >::protocol_service_type protocol_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type fcgi::fcgi_request_service::implementation_type::protocol_type]
+
+[indexterm2 protocol_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef ::cgi::common::fcgi_ protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_role_ fcgi::fcgi_request_service::implementation_type::request_role_]
+
+[indexterm2 request_role_..fcgi::fcgi_request_service::implementation_type]
+
+ fcgi::spec_detail::role_types request_role_;
+
+
+
+[endsect]
+
+
+
+[section:request_status_ fcgi::fcgi_request_service::implementation_type::request_status_]
+
+[indexterm2 request_status_..fcgi::fcgi_request_service::implementation_type]
+
+ common::request_status request_status_;
+
+
+
+[endsect]
+
+
+
+[section:request_type fcgi::fcgi_request_service::implementation_type::request_type]
+
+[indexterm2 request_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef detail::protocol_traits< protocol_type >::request_type request_type;
+
+
+
+
+[endsect]
+
+
+
+[section:service_ fcgi::fcgi_request_service::implementation_type::service_]
+
+[indexterm2 service_..fcgi::fcgi_request_service::implementation_type]
+
+ protocol_service_type * service_;
+
+
+
+[endsect]
+
+
+
+[section:stdin_parsed_ fcgi::fcgi_request_service::implementation_type::stdin_parsed_]
+
+[indexterm2 stdin_parsed_..fcgi::fcgi_request_service::implementation_type]
+
+ bool stdin_parsed_;
+
+
+
+[endsect]
+
+
+
+[section:string_type fcgi::fcgi_request_service::implementation_type::string_type]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 string_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef std::basic_string< char_type > string_type;
+
+
+
+
+[endsect]
+
+
+
+[section:var_map_type fcgi::fcgi_request_service::implementation_type::var_map_type]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 var_map_type..fcgi::fcgi_request_service::implementation_type]
+
+ typedef boost::fusion::vector< common::env_map, common::get_map, common::post_map, common::cookie_map, common::session_map > var_map_type;
+
+
+
+If you want to add a new data type to a request you need to: > Update this file (just below) > Update source_enums.hpp > Update map.hpp with a new map type > Use the `BOOST\_CGI\_DETAIL\_MAP\_ACCESS` macro in `basic\_request<>`, next to the other uses of it.
+
+
+[endsect]
+
+
+
+[section:vars_ fcgi::fcgi_request_service::implementation_type::vars_]
+
+
+['Inherited from common::request_base::impl_base.]
+
+[indexterm2 vars_..fcgi::fcgi_request_service::implementation_type]
+
+ var_map_type vars_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:fcgi__packet_type__packet_types fcgi::packet_type::packet_types]
+
+[indexterm1 fcgi::packet_type::packet_types]
+
+ enum packet_types
+
+[heading Values]
+[variablelist
+
+ [
+ [get_data]
+ []
+ ]
+
+ [
+ [end_get_data]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:fcgi__request fcgi::request]
+
+[indexterm1 fcgi::request]
+
+ typedef common::basic_request< fcgi_request_service, service > request;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__callback_functor [*callback_functor]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service__implementation_type [*implementation_type]]]
+ [The actual implementation date for an FCGI request. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.full_type [*full_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.proc_func_t [*proc_func_t]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.self_type [*self_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__fcgi_request_service.string_type [*string_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.async_load [*async_load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.begin_request_helper [*begin_request_helper]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.clear [*clear]]]
+ [Clear all request data (object is then safe to remove). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.client [*client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.close [*close]]]
+ [Close the request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.fcgi_request_service [*fcgi_request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.handle_admin_request [*handle_admin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.handle_other_request_header [*handle_other_request_header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.is_file [*is_file]]]
+ [Check if a given POST variable represents a file upload. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.load [*load]]]
+ [Synchronously read/parse the request meta-data. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.load_environment [*load_environment]]]
+ [Load the base_environment into the current environment. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.params_read [*params_read]]]
+ [Returns true if the request environment params have been read. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_body [*parse_body]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_header [*parse_header]]]
+ [Parse the current header. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_packet [*parse_packet]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_abort_request [*process_abort_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_begin_request [*process_begin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_params [*process_params]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.process_stdin [*process_stdin]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_body [*read_body]]]
+ [Read the body of the current packet; do nothing with it. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_env_vars [*read_env_vars]]]
+ [Read in the FastCGI (env) params. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_header [*read_header]]]
+ [Read a single header, buf do nothing with it. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.read_some [*read_some]]]
+ [Read some data from the client into the supplied buffer. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.request_id [*request_id]]]
+ [Get the request ID of a FastCGI request, or 1. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.set_service [*set_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.set_status [*set_status]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service._fcgi_request_service [*~fcgi_request_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_one_post_var [*parse_one_post_var]]]
+ [Read and parse a single cgi POST meta variable (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.id [*id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__fcgi_request_service.proc_funcs [*proc_funcs]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:fcgi__service fcgi::service]
+
+[indexterm1 fcgi::service]
+
+ typedef ::cgi::common::basic_protocol_service< ::cgi::common::fcgi_ > service;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.ios_provider_type [*ios_provider_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.queue_type [*queue_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.set_type [*set_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.traits [*traits]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.basic_protocol_service [*basic_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.dispatch [*dispatch]]]
+ [Dispatch a handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.io_service [*io_service]]]
+ [Return an available io_service from the IoServiceProvider. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.post [*post]]]
+ [Post the handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.reset [*reset]]]
+ [Reset all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.run [*run]]]
+ [Run all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.stop [*stop]]]
+ [Stop all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service._basic_protocol_service [*~basic_protocol_service]]]
+ []
+ ]
+
+]
+
+Holds the request queue and the connection queue. It is also a wrapper around asio::io\_service
+
+
+
+[endsect]
+
+
+
+[section:fcgi__service_t fcgi::service_t]
+
+[indexterm1 fcgi::service_t]
+
+ typedef service service_t;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.ios_provider_type [*ios_provider_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.queue_type [*queue_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_ptr [*request_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.request_type [*request_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.set_type [*set_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.common__basic_protocol_service.traits [*traits]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.basic_protocol_service [*basic_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.dispatch [*dispatch]]]
+ [Dispatch a handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.io_service [*io_service]]]
+ [Return an available io_service from the IoServiceProvider. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.post [*post]]]
+ [Post the handler through an available io_service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.reset [*reset]]]
+ [Reset all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.run [*run]]]
+ [Run all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service.stop [*stop]]]
+ [Stop all the io_services contained by this service. ]
+ ]
+
+ [
+ [[link cgi.reference.common__basic_protocol_service._basic_protocol_service [*~basic_protocol_service]]]
+ []
+ ]
+
+]
+
+Holds the request queue and the connection queue. It is also a wrapper around asio::io\_service
+
+
+
+[endsect]
+
+
+[section:fcgi__spec_detail__BeginRequestBody fcgi::spec_detail::BeginRequestBody]
+
+
+
+ class BeginRequestBody
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__BeginRequestBody.flags [*flags]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__BeginRequestBody.role [*role]]]
+ []
+ ]
+
+]
+
+
+[section:flags fcgi::spec_detail::BeginRequestBody::flags]
+
+[indexterm2 flags..fcgi::spec_detail::BeginRequestBody]
+
+ unsigned char flags() const;
+
+
+
+[endsect]
+
+
+
+[section:role fcgi::spec_detail::BeginRequestBody::role]
+
+[indexterm2 role..fcgi::spec_detail::BeginRequestBody]
+
+ int role() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__BeginRequestBody__implementation_type fcgi::spec_detail::BeginRequestBody::implementation_type]
+
+The underlying type of a BeginRequestBody sub-header.
+
+ struct implementation_type
+
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__BeginRequestBody__implementation_type.flags_ [*flags_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__BeginRequestBody__implementation_type.reserved_ [*reserved_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__BeginRequestBody__implementation_type.roleB0_ [*roleB0_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__BeginRequestBody__implementation_type.roleB1_ [*roleB1_]]]
+ []
+ ]
+
+]
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[section:flags_ fcgi::spec_detail::BeginRequestBody::implementation_type::flags_]
+
+[indexterm2 flags_..fcgi::spec_detail::BeginRequestBody::implementation_type]
+
+ unsigned char flags_;
+
+
+
+[endsect]
+
+
+
+[section:reserved_ fcgi::spec_detail::BeginRequestBody::implementation_type::reserved_]
+
+[indexterm2 reserved_..fcgi::spec_detail::BeginRequestBody::implementation_type]
+
+ unsigned char reserved_;
+
+
+
+[endsect]
+
+
+
+[section:roleB0_ fcgi::spec_detail::BeginRequestBody::implementation_type::roleB0_]
+
+[indexterm2 roleB0_..fcgi::spec_detail::BeginRequestBody::implementation_type]
+
+ unsigned char roleB0_;
+
+
+
+[endsect]
+
+
+
+[section:roleB1_ fcgi::spec_detail::BeginRequestBody::implementation_type::roleB1_]
+
+[indexterm2 roleB1_..fcgi::spec_detail::BeginRequestBody::implementation_type]
+
+ unsigned char roleB1_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__BeginRequestRecord fcgi::spec_detail::BeginRequestRecord]
+
+
+
+ struct BeginRequestRecord
+
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__BeginRequestRecord.body_ [*body_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__BeginRequestRecord.header_ [*header_]]]
+ []
+ ]
+
+]
+
+
+[section:body_ fcgi::spec_detail::BeginRequestRecord::body_]
+
+[indexterm2 body_..fcgi::spec_detail::BeginRequestRecord]
+
+ BeginRequestBody body_;
+
+
+
+[endsect]
+
+
+
+[section:header_ fcgi::spec_detail::BeginRequestRecord::header_]
+
+[indexterm2 header_..fcgi::spec_detail::BeginRequestRecord]
+
+ Header header_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__EndRequestBody fcgi::spec_detail::EndRequestBody]
+
+
+
+ class EndRequestBody
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody.EndRequestBody [*EndRequestBody]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody.data [*data]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody.reset [*reset]]]
+ []
+ ]
+
+]
+
+[section:EndRequestBody fcgi::spec_detail::EndRequestBody::EndRequestBody]
+
+[indexterm2 EndRequestBody..fcgi::spec_detail::EndRequestBody]
+
+ ``[link cgi.reference.fcgi__spec_detail__EndRequestBody.EndRequestBody.overload1 EndRequestBody]``(
+ boost::uint64_t appStatus,
+ status_types procStatus);
+
+ ``[link cgi.reference.fcgi__spec_detail__EndRequestBody.EndRequestBody.overload2 EndRequestBody]``();
+
+
+[section:overload1 fcgi::spec_detail::EndRequestBody::EndRequestBody (1 of 2 overloads)]
+
+
+
+ EndRequestBody(
+ boost::uint64_t appStatus,
+ status_types procStatus);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::spec_detail::EndRequestBody::EndRequestBody (2 of 2 overloads)]
+
+
+
+ EndRequestBody();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:const_buffers_type fcgi::spec_detail::EndRequestBody::const_buffers_type]
+
+[indexterm2 const_buffers_type..fcgi::spec_detail::EndRequestBody]
+
+ typedef boost::asio::const_buffers_1 const_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:data fcgi::spec_detail::EndRequestBody::data]
+
+[indexterm2 data..fcgi::spec_detail::EndRequestBody]
+
+ const_buffers_type data() const;
+
+
+
+[endsect]
+
+
+
+[section:reset fcgi::spec_detail::EndRequestBody::reset]
+
+[indexterm2 reset..fcgi::spec_detail::EndRequestBody]
+
+ void reset(
+ boost::uint64_t appStatus,
+ status_types procStatus);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__EndRequestBody__implementation_type fcgi::spec_detail::EndRequestBody::implementation_type]
+
+The underlying type of an EndRequestBody sub-header.
+
+ struct implementation_type
+
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody__implementation_type.appStatusB0_ [*appStatusB0_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody__implementation_type.appStatusB1_ [*appStatusB1_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody__implementation_type.appStatusB2_ [*appStatusB2_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody__implementation_type.appStatusB3_ [*appStatusB3_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody__implementation_type.protocolStatus_ [*protocolStatus_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody__implementation_type.reserved_ [*reserved_]]]
+ []
+ ]
+
+]
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[section:appStatusB0_ fcgi::spec_detail::EndRequestBody::implementation_type::appStatusB0_]
+
+[indexterm2 appStatusB0_..fcgi::spec_detail::EndRequestBody::implementation_type]
+
+ unsigned char appStatusB0_;
+
+
+
+[endsect]
+
+
+
+[section:appStatusB1_ fcgi::spec_detail::EndRequestBody::implementation_type::appStatusB1_]
+
+[indexterm2 appStatusB1_..fcgi::spec_detail::EndRequestBody::implementation_type]
+
+ unsigned char appStatusB1_;
+
+
+
+[endsect]
+
+
+
+[section:appStatusB2_ fcgi::spec_detail::EndRequestBody::implementation_type::appStatusB2_]
+
+[indexterm2 appStatusB2_..fcgi::spec_detail::EndRequestBody::implementation_type]
+
+ unsigned char appStatusB2_;
+
+
+
+[endsect]
+
+
+
+[section:appStatusB3_ fcgi::spec_detail::EndRequestBody::implementation_type::appStatusB3_]
+
+[indexterm2 appStatusB3_..fcgi::spec_detail::EndRequestBody::implementation_type]
+
+ unsigned char appStatusB3_;
+
+
+
+[endsect]
+
+
+
+[section:protocolStatus_ fcgi::spec_detail::EndRequestBody::implementation_type::protocolStatus_]
+
+[indexterm2 protocolStatus_..fcgi::spec_detail::EndRequestBody::implementation_type]
+
+ unsigned char protocolStatus_;
+
+
+
+[endsect]
+
+
+
+[section:reserved_ fcgi::spec_detail::EndRequestBody::implementation_type::reserved_]
+
+[indexterm2 reserved_..fcgi::spec_detail::EndRequestBody::implementation_type]
+
+ unsigned char reserved_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__EndRequestRecord fcgi::spec_detail::EndRequestRecord]
+
+
+
+ class EndRequestRecord
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestRecord.EndRequestRecord [*EndRequestRecord]]]
+ []
+ ]
+
+]
+
+
+[section:EndRequestRecord fcgi::spec_detail::EndRequestRecord::EndRequestRecord]
+
+[indexterm2 EndRequestRecord..fcgi::spec_detail::EndRequestRecord]
+
+ EndRequestRecord(
+ boost::uint16_t id,
+ boost::uint64_t appStatus,
+ status_types procStatus);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__EndRequestRecord__implementation_type fcgi::spec_detail::EndRequestRecord::implementation_type]
+
+The underlying type of an EndRequestRecord sub-header.
+
+ struct implementation_type
+
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestRecord__implementation_type.body_ [*body_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestRecord__implementation_type.header_ [*header_]]]
+ []
+ ]
+
+]
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[section:body_ fcgi::spec_detail::EndRequestRecord::implementation_type::body_]
+
+[indexterm2 body_..fcgi::spec_detail::EndRequestRecord::implementation_type]
+
+ EndRequestBody body_;
+
+
+
+[endsect]
+
+
+
+[section:header_ fcgi::spec_detail::EndRequestRecord::implementation_type::header_]
+
+[indexterm2 header_..fcgi::spec_detail::EndRequestRecord::implementation_type]
+
+ Header header_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__Header fcgi::spec_detail::Header]
+
+
+
+ struct Header
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type [*implementation_type]]]
+ [The underlying type of a FastCGI header. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.Header [*Header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.body_length [*body_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.content_length [*content_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.data [*data]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.padding_length [*padding_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.reset [*reset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.type [*type]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.version [*version]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.impl [*impl]]]
+ [The underlying type of a FastCGI header. ]
+ ]
+
+]
+
+[section:Header fcgi::spec_detail::Header::Header]
+
+[indexterm2 Header..fcgi::spec_detail::Header]
+
+ ``[link cgi.reference.fcgi__spec_detail__Header.Header.overload1 Header]``(
+ request_types t,
+ int id,
+ int len);
+
+ ``[link cgi.reference.fcgi__spec_detail__Header.Header.overload2 Header]``();
+
+
+[section:overload1 fcgi::spec_detail::Header::Header (1 of 2 overloads)]
+
+
+
+ Header(
+ request_types t,
+ int id,
+ int len);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::spec_detail::Header::Header (2 of 2 overloads)]
+
+
+
+ Header();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:body_length fcgi::spec_detail::Header::body_length]
+
+[indexterm2 body_length..fcgi::spec_detail::Header]
+
+ int body_length() const;
+
+
+
+[endsect]
+
+
+
+[section:const_buffers_type fcgi::spec_detail::Header::const_buffers_type]
+
+[indexterm2 const_buffers_type..fcgi::spec_detail::Header]
+
+ typedef boost::asio::const_buffers_1 const_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:content_length fcgi::spec_detail::Header::content_length]
+
+[indexterm2 content_length..fcgi::spec_detail::Header]
+
+ boost::uint16_t content_length() const;
+
+
+
+[endsect]
+
+
+[section:data fcgi::spec_detail::Header::data]
+
+[indexterm2 data..fcgi::spec_detail::Header]
+
+ const_buffers_type ``[link cgi.reference.fcgi__spec_detail__Header.data.overload1 data]``() const;
+
+ mutable_buffers_type ``[link cgi.reference.fcgi__spec_detail__Header.data.overload2 data]``();
+
+
+[section:overload1 fcgi::spec_detail::Header::data (1 of 2 overloads)]
+
+
+
+ const_buffers_type data() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::spec_detail::Header::data (2 of 2 overloads)]
+
+
+
+ mutable_buffers_type data();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:impl fcgi::spec_detail::Header::impl]
+
+[indexterm2 impl..fcgi::spec_detail::Header] The underlying type of a FastCGI header.
+
+ struct cgi::fcgi::spec_detail::Header::implementation_type impl;
+
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[endsect]
+
+
+
+[section:mutable_buffers_type fcgi::spec_detail::Header::mutable_buffers_type]
+
+[indexterm2 mutable_buffers_type..fcgi::spec_detail::Header]
+
+ typedef boost::asio::mutable_buffers_1 mutable_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:padding_length fcgi::spec_detail::Header::padding_length]
+
+[indexterm2 padding_length..fcgi::spec_detail::Header]
+
+ boost::uint16_t padding_length() const;
+
+
+
+[endsect]
+
+
+
+[section:request_id fcgi::spec_detail::Header::request_id]
+
+[indexterm2 request_id..fcgi::spec_detail::Header]
+
+ boost::uint16_t request_id() const;
+
+
+
+[endsect]
+
+
+
+[section:reset fcgi::spec_detail::Header::reset]
+
+[indexterm2 reset..fcgi::spec_detail::Header]
+
+ void reset(
+ request_types t,
+ int id,
+ int len);
+
+
+
+[endsect]
+
+
+
+[section:type fcgi::spec_detail::Header::type]
+
+[indexterm2 type..fcgi::spec_detail::Header]
+
+ boost::uint16_t type() const;
+
+
+
+[endsect]
+
+
+
+[section:version fcgi::spec_detail::Header::version]
+
+[indexterm2 version..fcgi::spec_detail::Header]
+
+ boost::uint16_t version() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__Header__implementation_type fcgi::spec_detail::Header::implementation_type]
+
+The underlying type of a FastCGI header.
+
+ struct implementation_type
+
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type.contentLengthB0_ [*contentLengthB0_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type.contentLengthB1_ [*contentLengthB1_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type.paddingLength_ [*paddingLength_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type.requestIdB0_ [*requestIdB0_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type.requestIdB1_ [*requestIdB1_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type.reserved_ [*reserved_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type.type_ [*type_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type.version_ [*version_]]]
+ []
+ ]
+
+]
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[section:contentLengthB0_ fcgi::spec_detail::Header::implementation_type::contentLengthB0_]
+
+[indexterm2 contentLengthB0_..fcgi::spec_detail::Header::implementation_type]
+
+ unsigned char contentLengthB0_;
+
+
+
+[endsect]
+
+
+
+[section:contentLengthB1_ fcgi::spec_detail::Header::implementation_type::contentLengthB1_]
+
+[indexterm2 contentLengthB1_..fcgi::spec_detail::Header::implementation_type]
+
+ unsigned char contentLengthB1_;
+
+
+
+[endsect]
+
+
+
+[section:paddingLength_ fcgi::spec_detail::Header::implementation_type::paddingLength_]
+
+[indexterm2 paddingLength_..fcgi::spec_detail::Header::implementation_type]
+
+ unsigned char paddingLength_;
+
+
+
+[endsect]
+
+
+
+[section:requestIdB0_ fcgi::spec_detail::Header::implementation_type::requestIdB0_]
+
+[indexterm2 requestIdB0_..fcgi::spec_detail::Header::implementation_type]
+
+ unsigned char requestIdB0_;
+
+
+
+[endsect]
+
+
+
+[section:requestIdB1_ fcgi::spec_detail::Header::implementation_type::requestIdB1_]
+
+[indexterm2 requestIdB1_..fcgi::spec_detail::Header::implementation_type]
+
+ unsigned char requestIdB1_;
+
+
+
+[endsect]
+
+
+
+[section:reserved_ fcgi::spec_detail::Header::implementation_type::reserved_]
+
+[indexterm2 reserved_..fcgi::spec_detail::Header::implementation_type]
+
+ unsigned char reserved_;
+
+
+
+[endsect]
+
+
+
+[section:type_ fcgi::spec_detail::Header::implementation_type::type_]
+
+[indexterm2 type_..fcgi::spec_detail::Header::implementation_type]
+
+ unsigned char type_;
+
+
+
+[endsect]
+
+
+
+[section:version_ fcgi::spec_detail::Header::implementation_type::version_]
+
+[indexterm2 version_..fcgi::spec_detail::Header::implementation_type]
+
+ unsigned char version_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__UnknownTypeBody fcgi::spec_detail::UnknownTypeBody]
+
+
+
+ class UnknownTypeBody
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__UnknownTypeBody.UnknownTypeBody [*UnknownTypeBody]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__UnknownTypeBody.reset [*reset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__UnknownTypeBody.type [*type]]]
+ []
+ ]
+
+]
+
+[section:UnknownTypeBody fcgi::spec_detail::UnknownTypeBody::UnknownTypeBody]
+
+[indexterm2 UnknownTypeBody..fcgi::spec_detail::UnknownTypeBody]
+
+ ``[link cgi.reference.fcgi__spec_detail__UnknownTypeBody.UnknownTypeBody.overload1 UnknownTypeBody]``(
+ unsigned char t);
+
+ ``[link cgi.reference.fcgi__spec_detail__UnknownTypeBody.UnknownTypeBody.overload2 UnknownTypeBody]``();
+
+
+[section:overload1 fcgi::spec_detail::UnknownTypeBody::UnknownTypeBody (1 of 2 overloads)]
+
+
+
+ UnknownTypeBody(
+ unsigned char t);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::spec_detail::UnknownTypeBody::UnknownTypeBody (2 of 2 overloads)]
+
+
+
+ UnknownTypeBody();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:reset fcgi::spec_detail::UnknownTypeBody::reset]
+
+[indexterm2 reset..fcgi::spec_detail::UnknownTypeBody]
+
+ void reset(
+ unsigned char t);
+
+
+
+[endsect]
+
+
+
+[section:type fcgi::spec_detail::UnknownTypeBody::type]
+
+[indexterm2 type..fcgi::spec_detail::UnknownTypeBody]
+
+ unsigned char type() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__UnknownTypeBody__implementation_type fcgi::spec_detail::UnknownTypeBody::implementation_type]
+
+The underlying type of an UnknownTypeBody sub-header.
+
+ struct implementation_type
+
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__UnknownTypeBody__implementation_type.reserved_ [*reserved_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__UnknownTypeBody__implementation_type.type_ [*type_]]]
+ []
+ ]
+
+]
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[section:reserved_ fcgi::spec_detail::UnknownTypeBody::implementation_type::reserved_]
+
+[indexterm2 reserved_..fcgi::spec_detail::UnknownTypeBody::implementation_type]
+
+ unsigned char reserved_;
+
+
+
+[endsect]
+
+
+
+[section:type_ fcgi::spec_detail::UnknownTypeBody::implementation_type::type_]
+
+[indexterm2 type_..fcgi::spec_detail::UnknownTypeBody::implementation_type]
+
+ unsigned char type_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__UnknownTypeRecord fcgi::spec_detail::UnknownTypeRecord]
+
+
+
+ class UnknownTypeRecord
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__UnknownTypeRecord.UnknownTypeRecord [*UnknownTypeRecord]]]
+ []
+ ]
+
+]
+
+
+[section:UnknownTypeRecord fcgi::spec_detail::UnknownTypeRecord::UnknownTypeRecord]
+
+[indexterm2 UnknownTypeRecord..fcgi::spec_detail::UnknownTypeRecord]
+
+ UnknownTypeRecord(
+ int type);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__spec_detail__UnknownTypeRecord__implementation_type fcgi::spec_detail::UnknownTypeRecord::implementation_type]
+
+The underlying type of a UnknownTypeRecord sub-header.
+
+ struct implementation_type
+
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__UnknownTypeRecord__implementation_type.body_ [*body_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__UnknownTypeRecord__implementation_type.header_ [*header_]]]
+ []
+ ]
+
+]
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[section:body_ fcgi::spec_detail::UnknownTypeRecord::implementation_type::body_]
+
+[indexterm2 body_..fcgi::spec_detail::UnknownTypeRecord::implementation_type]
+
+ UnknownTypeBody body_;
+
+
+
+[endsect]
+
+
+
+[section:header_ fcgi::spec_detail::UnknownTypeRecord::implementation_type::header_]
+
+[indexterm2 header_..fcgi::spec_detail::UnknownTypeRecord::implementation_type]
+
+ Header header_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:fcgi__spec_detail__request_types fcgi::spec_detail::request_types]
+
+[indexterm1 fcgi::spec_detail::request_types]
+
+ enum request_types
+
+[heading Values]
+[variablelist
+
+ [
+ [BEGIN_REQUEST]
+ []
+ ]
+
+ [
+ [ABORT_REQUEST]
+ []
+ ]
+
+ [
+ [END_REQUEST]
+ []
+ ]
+
+ [
+ [PARAMS]
+ []
+ ]
+
+ [
+ [STDIN]
+ []
+ ]
+
+ [
+ [STDOUT]
+ []
+ ]
+
+ [
+ [STDERR]
+ []
+ ]
+
+ [
+ [DATA]
+ []
+ ]
+
+ [
+ [GET_VALUES]
+ []
+ ]
+
+ [
+ [GET_VALUES_RESULT]
+ []
+ ]
+
+ [
+ [UNKNOWN_TYPE]
+ []
+ ]
+
+ [
+ [MAXTYPE]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:fcgi__spec_detail__role_types fcgi::spec_detail::role_types]
+
+[indexterm1 fcgi::spec_detail::role_types]
+
+ enum role_types
+
+[heading Values]
+[variablelist
+
+ [
+ [RESPONDER]
+ []
+ ]
+
+ [
+ [AUTHORIZER]
+ []
+ ]
+
+ [
+ [FILTER]
+ []
+ ]
+
+ [
+ [ANY]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:fcgi__spec_detail__status_types fcgi::spec_detail::status_types]
+
+[indexterm1 fcgi::spec_detail::status_types]
+
+ enum status_types
+
+[heading Values]
+[variablelist
+
+ [
+ [REQUEST_COMPLETE]
+ []
+ ]
+
+ [
+ [CANT_MPX_CONN]
+ []
+ ]
+
+ [
+ [OVERLOADED]
+ []
+ ]
+
+ [
+ [UNKNOWN_ROLE]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:fcgi__specification__AUX_WRAPPER_NAME fcgi::specification::AUX_WRAPPER_NAME]
+
+
+
+ template<
+ AUX_WRAPPER_PARAMS(N) >
+ struct AUX_WRAPPER_NAME
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.tag [*tag]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.type [*type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.value_type [*value_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.AUX_WRAPPER_INST [*AUX_WRAPPER_INST]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.BOOST_STATIC_CONSTANT [*BOOST_STATIC_CONSTANT]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.operator_AUX_WRAPPER_VALUE_TYPE [*operator AUX_WRAPPER_VALUE_TYPE]]]
+ []
+ ]
+
+]
+
+[section:AUX_WRAPPER_INST fcgi::specification::AUX_WRAPPER_NAME::AUX_WRAPPER_INST]
+
+[indexterm2 AUX_WRAPPER_INST..fcgi::specification::AUX_WRAPPER_NAME]
+
+ typedef ``[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.AUX_WRAPPER_INST.overload1 AUX_WRAPPER_INST]``(
+ BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE,(value-1)) );
+
+ typedef ``[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.AUX_WRAPPER_INST.overload2 AUX_WRAPPER_INST]``(
+ BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE,(value+1)) );
+
+
+[section:overload1 fcgi::specification::AUX_WRAPPER_NAME::AUX_WRAPPER_INST (1 of 2 overloads)]
+
+
+
+ typedef AUX_WRAPPER_INST(
+ BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE,(value-1)) );
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::specification::AUX_WRAPPER_NAME::AUX_WRAPPER_INST (2 of 2 overloads)]
+
+
+
+ typedef AUX_WRAPPER_INST(
+ BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE,(value+1)) );
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:BOOST_STATIC_CONSTANT fcgi::specification::AUX_WRAPPER_NAME::BOOST_STATIC_CONSTANT]
+
+[indexterm2 BOOST_STATIC_CONSTANT..fcgi::specification::AUX_WRAPPER_NAME]
+
+ BOOST_STATIC_CONSTANT(
+ AUX_WRAPPER_VALUE_TYPE ,
+ value = N);
+
+
+
+[endsect]
+
+
+
+[section:operator_AUX_WRAPPER_VALUE_TYPE fcgi::specification::AUX_WRAPPER_NAME::operator AUX_WRAPPER_VALUE_TYPE]
+
+[indexterm2 operator AUX_WRAPPER_VALUE_TYPE..fcgi::specification::AUX_WRAPPER_NAME]
+
+ operator AUX_WRAPPER_VALUE_TYPE() const;
+
+
+
+[endsect]
+
+
+
+[section:tag fcgi::specification::AUX_WRAPPER_NAME::tag]
+
+[indexterm2 tag..fcgi::specification::AUX_WRAPPER_NAME]
+
+ typedef integral_c_tag tag;
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__integral_c_tag.BOOST_STATIC_CONSTANT [*BOOST_STATIC_CONSTANT]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:type fcgi::specification::AUX_WRAPPER_NAME::type]
+
+[indexterm2 type..fcgi::specification::AUX_WRAPPER_NAME]
+
+ typedef AUX_WRAPPER_NAME type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.tag [*tag]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.type [*type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.value_type [*value_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.AUX_WRAPPER_INST [*AUX_WRAPPER_INST]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.BOOST_STATIC_CONSTANT [*BOOST_STATIC_CONSTANT]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__AUX_WRAPPER_NAME.operator_AUX_WRAPPER_VALUE_TYPE [*operator AUX_WRAPPER_VALUE_TYPE]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:value_type fcgi::specification::AUX_WRAPPER_NAME::value_type]
+
+[indexterm2 value_type..fcgi::specification::AUX_WRAPPER_NAME]
+
+ typedef AUX_WRAPPER_VALUE_TYPE value_type;
+
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__specification__BeginRequestBody fcgi::specification::BeginRequestBody]
+
+
+
+ class BeginRequestBody
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__BeginRequestBody.flags [*flags]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__BeginRequestBody.role [*role]]]
+ []
+ ]
+
+]
+
+
+[section:flags fcgi::specification::BeginRequestBody::flags]
+
+[indexterm2 flags..fcgi::specification::BeginRequestBody]
+
+ unsigned char flags() const;
+
+
+
+[endsect]
+
+
+
+[section:role fcgi::specification::BeginRequestBody::role]
+
+[indexterm2 role..fcgi::specification::BeginRequestBody]
+
+ int role() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__specification__BeginRequestBody__implementation_type fcgi::specification::BeginRequestBody::implementation_type]
+
+The underlying type of a BeginRequestBody sub-header.
+
+ struct implementation_type
+
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__BeginRequestBody__implementation_type.flags_ [*flags_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__BeginRequestBody__implementation_type.reserved_ [*reserved_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__BeginRequestBody__implementation_type.roleB0_ [*roleB0_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__BeginRequestBody__implementation_type.roleB1_ [*roleB1_]]]
+ []
+ ]
+
+]
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[section:flags_ fcgi::specification::BeginRequestBody::implementation_type::flags_]
+
+[indexterm2 flags_..fcgi::specification::BeginRequestBody::implementation_type]
+
+ unsigned char flags_;
+
+
+
+[endsect]
+
+
+
+[section:reserved_ fcgi::specification::BeginRequestBody::implementation_type::reserved_]
+
+[indexterm2 reserved_..fcgi::specification::BeginRequestBody::implementation_type]
+
+ unsigned char reserved_;
+
+
+
+[endsect]
+
+
+
+[section:roleB0_ fcgi::specification::BeginRequestBody::implementation_type::roleB0_]
+
+[indexterm2 roleB0_..fcgi::specification::BeginRequestBody::implementation_type]
+
+ unsigned char roleB0_;
+
+
+
+[endsect]
+
+
+
+[section:roleB1_ fcgi::specification::BeginRequestBody::implementation_type::roleB1_]
+
+[indexterm2 roleB1_..fcgi::specification::BeginRequestBody::implementation_type]
+
+ unsigned char roleB1_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__specification__begin_request fcgi::specification::begin_request]
+
+
+
+ struct begin_request
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__begin_request.buffer_type [*buffer_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__begin_request__body [*body]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__begin_request.begin_request [*begin_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__begin_request.flags [*flags]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__begin_request.flags [*flags]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__begin_request.role [*role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__begin_request.role [*role]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__begin_request.impl [*impl]]]
+ []
+ ]
+
+]
+
+
+[section:begin_request fcgi::specification::begin_request::begin_request]
+
+[indexterm2 begin_request..fcgi::specification::begin_request]
+
+ begin_request(
+ buffer_type & buf);
+
+
+
+[endsect]
+
+
+
+[section:buffer_type fcgi::specification::begin_request::buffer_type]
+
+[indexterm2 buffer_type..fcgi::specification::begin_request]
+
+ typedef boost::array< unsigned char, header_length::value > buffer_type;
+
+
+
+
+[endsect]
+
+
+
+[section:flags fcgi::specification::begin_request::flags]
+
+[indexterm2 flags..fcgi::specification::begin_request]
+
+ unsigned char flags();
+
+
+
+[endsect]
+
+
+
+[section:flags fcgi::specification::begin_request::flags]
+
+[indexterm2 flags..fcgi::specification::begin_request]
+
+ template<
+ typename Array >
+ static unsigned char flags(
+ Array & a);
+
+
+
+[endsect]
+
+
+
+[section:impl fcgi::specification::begin_request::impl]
+
+[indexterm2 impl..fcgi::specification::begin_request]
+
+ buffer_type impl;
+
+
+
+[endsect]
+
+
+
+[section:role fcgi::specification::begin_request::role]
+
+[indexterm2 role..fcgi::specification::begin_request]
+
+ spec_detail::role_types role();
+
+
+
+[endsect]
+
+
+
+[section:role fcgi::specification::begin_request::role]
+
+[indexterm2 role..fcgi::specification::begin_request]
+
+ template<
+ typename Array >
+ static spec_detail::role_types role(
+ Array & a);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__specification__begin_request__body fcgi::specification::begin_request::body]
+
+
+
+ struct body
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__begin_request__body.size [*size]]]
+ []
+
+ ]
+
+]
+
+
+[section:size fcgi::specification::begin_request::body::size]
+
+[indexterm2 size..fcgi::specification::begin_request::body]
+
+ typedef boost::mpl::int_< 8 > size;
+
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__specification__end_request fcgi::specification::end_request]
+
+
+
+ struct end_request :
+ public fcgi::spec_detail::Header,
+ fcgi::spec_detail::EndRequestBody
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__end_request.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__end_request.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.body_length [*body_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.content_length [*content_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.data [*data]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.end_request [*end_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.padding_length [*padding_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.reset [*reset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.type [*type]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.version [*version]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__end_request.impl [*impl]]]
+ [The underlying type of a FastCGI header. ]
+ ]
+
+]
+
+
+[section:body_length fcgi::specification::end_request::body_length]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 body_length..fcgi::specification::end_request]
+
+ int body_length() const;
+
+
+
+[endsect]
+
+
+
+[section:const_buffers_type fcgi::specification::end_request::const_buffers_type]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 const_buffers_type..fcgi::specification::end_request]
+
+ typedef boost::asio::const_buffers_1 const_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:content_length fcgi::specification::end_request::content_length]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 content_length..fcgi::specification::end_request]
+
+ boost::uint16_t content_length() const;
+
+
+
+[endsect]
+
+
+[section:data fcgi::specification::end_request::data]
+
+[indexterm2 data..fcgi::specification::end_request]
+
+ const_buffers_type ``[link cgi.reference.fcgi__specification__end_request.data.overload1 data]``() const;
+
+ mutable_buffers_type ``[link cgi.reference.fcgi__specification__end_request.data.overload2 data]``();
+
+
+[section:overload1 fcgi::specification::end_request::data (1 of 2 overloads)]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+
+
+ const_buffers_type data() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::specification::end_request::data (2 of 2 overloads)]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+
+
+ mutable_buffers_type data();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:end_request fcgi::specification::end_request::end_request]
+
+[indexterm2 end_request..fcgi::specification::end_request]
+
+ end_request(
+ int request_id = 0,
+ boost::uint64_t app_status = 0,
+ spec_detail::status_types proc_status = spec_detail::REQUEST_COMPLETE);
+
+
+
+[endsect]
+
+
+
+[section:impl fcgi::specification::end_request::impl]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 impl..fcgi::specification::end_request] The underlying type of a FastCGI header.
+
+ struct cgi::fcgi::spec_detail::Header::implementation_type impl;
+
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[endsect]
+
+
+
+[section:mutable_buffers_type fcgi::specification::end_request::mutable_buffers_type]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 mutable_buffers_type..fcgi::specification::end_request]
+
+ typedef boost::asio::mutable_buffers_1 mutable_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:padding_length fcgi::specification::end_request::padding_length]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 padding_length..fcgi::specification::end_request]
+
+ boost::uint16_t padding_length() const;
+
+
+
+[endsect]
+
+
+
+[section:request_id fcgi::specification::end_request::request_id]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 request_id..fcgi::specification::end_request]
+
+ boost::uint16_t request_id() const;
+
+
+
+[endsect]
+
+
+[section:reset fcgi::specification::end_request::reset]
+
+[indexterm2 reset..fcgi::specification::end_request]
+
+ void ``[link cgi.reference.fcgi__specification__end_request.reset.overload1 reset]``(
+ request_types t,
+ int id,
+ int len);
+
+ void ``[link cgi.reference.fcgi__specification__end_request.reset.overload2 reset]``(
+ int request_id,
+ boost::uint64_t app_status = 0,
+ spec_detail::status_types proc_status = spec_detail::REQUEST_COMPLETE);
+
+
+[section:overload1 fcgi::specification::end_request::reset (1 of 2 overloads)]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+
+
+ void reset(
+ request_types t,
+ int id,
+ int len);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::specification::end_request::reset (2 of 2 overloads)]
+
+
+
+ void reset(
+ int request_id,
+ boost::uint64_t app_status = 0,
+ spec_detail::status_types proc_status = spec_detail::REQUEST_COMPLETE);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:type fcgi::specification::end_request::type]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 type..fcgi::specification::end_request]
+
+ boost::uint16_t type() const;
+
+
+
+[endsect]
+
+
+
+[section:version fcgi::specification::end_request::version]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 version..fcgi::specification::end_request]
+
+ boost::uint16_t version() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:fcgi__specification__end_request_body fcgi::specification::end_request_body]
+
+[indexterm1 fcgi::specification::end_request_body]
+
+ typedef spec_detail::EndRequestBody end_request_body;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody.EndRequestBody [*EndRequestBody]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody.data [*data]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__EndRequestBody.reset [*reset]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:fcgi__specification__header fcgi::specification::header]
+
+[indexterm1 fcgi::specification::header]
+
+ typedef spec_detail::Header header;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header__implementation_type [*implementation_type]]]
+ [The underlying type of a FastCGI header. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__spec_detail__Header.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.Header [*Header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.body_length [*body_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.content_length [*content_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.data [*data]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.padding_length [*padding_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.reset [*reset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.type [*type]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.version [*version]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__spec_detail__Header.impl [*impl]]]
+ [The underlying type of a FastCGI header. ]
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:fcgi__specification__header_length fcgi::specification::header_length]
+
+
+
+ struct header_length
+
+
+
+[endsect]
+
+[section:fcgi__specification__integral_c_tag fcgi::specification::integral_c_tag]
+
+
+
+ struct integral_c_tag
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__integral_c_tag.BOOST_STATIC_CONSTANT [*BOOST_STATIC_CONSTANT]]]
+ []
+ ]
+
+]
+
+
+[section:BOOST_STATIC_CONSTANT fcgi::specification::integral_c_tag::BOOST_STATIC_CONSTANT]
+
+[indexterm2 BOOST_STATIC_CONSTANT..fcgi::specification::integral_c_tag]
+
+ BOOST_STATIC_CONSTANT(
+ int ,
+ value = 0);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__specification__listensock_fileno fcgi::specification::listensock_fileno]
+
+
+
+ struct listensock_fileno
+
+
+
+[endsect]
+
+[section:fcgi__specification__max_packet_size fcgi::specification::max_packet_size]
+
+Define the FastCGI spec using types.
+
+ template<
+ AUX_WRAPPER_PARAMS(N) >
+ struct max_packet_size
+
+
+Types are better than macros.
+
+
+[endsect]
+
+[section:fcgi__specification__null_request_id fcgi::specification::null_request_id]
+
+
+
+ struct null_request_id
+
+
+
+[endsect]
+
+[section:fcgi__specification__request_type fcgi::specification::request_type]
+
+
+
+ struct request_type
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__request_type.to_string [*to_string]]]
+ []
+ ]
+
+]
+
+
+[section:to_string fcgi::specification::request_type::to_string]
+
+[indexterm2 to_string..fcgi::specification::request_type]
+
+ template<
+ typename Array >
+ static std::string to_string(
+ Array & a);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__specification__role_type fcgi::specification::role_type]
+
+
+
+ struct role_type
+
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__role_type.to_string [*to_string]]]
+ []
+ ]
+
+]
+
+
+[section:to_string fcgi::specification::role_type::to_string]
+
+[indexterm2 to_string..fcgi::specification::role_type]
+
+ template<
+ typename Array >
+ static std::string to_string(
+ Array & a);
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi__specification__stdout_header fcgi::specification::stdout_header]
+
+
+
+ struct stdout_header :
+ public fcgi::spec_detail::Header
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__stdout_header.const_buffers_type [*const_buffers_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__specification__stdout_header.mutable_buffers_type [*mutable_buffers_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.body_length [*body_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.content_length [*content_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.data [*data]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.padding_length [*padding_length]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.request_id [*request_id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.reset [*reset]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.stdout_header [*stdout_header]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.type [*type]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.version [*version]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__specification__stdout_header.impl [*impl]]]
+ [The underlying type of a FastCGI header. ]
+ ]
+
+]
+
+
+[section:body_length fcgi::specification::stdout_header::body_length]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 body_length..fcgi::specification::stdout_header]
+
+ int body_length() const;
+
+
+
+[endsect]
+
+
+
+[section:const_buffers_type fcgi::specification::stdout_header::const_buffers_type]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 const_buffers_type..fcgi::specification::stdout_header]
+
+ typedef boost::asio::const_buffers_1 const_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:content_length fcgi::specification::stdout_header::content_length]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 content_length..fcgi::specification::stdout_header]
+
+ boost::uint16_t content_length() const;
+
+
+
+[endsect]
+
+
+[section:data fcgi::specification::stdout_header::data]
+
+[indexterm2 data..fcgi::specification::stdout_header]
+
+ const_buffers_type ``[link cgi.reference.fcgi__specification__stdout_header.data.overload1 data]``() const;
+
+ mutable_buffers_type ``[link cgi.reference.fcgi__specification__stdout_header.data.overload2 data]``();
+
+
+[section:overload1 fcgi::specification::stdout_header::data (1 of 2 overloads)]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+
+
+ const_buffers_type data() const;
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::specification::stdout_header::data (2 of 2 overloads)]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+
+
+ mutable_buffers_type data();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:impl fcgi::specification::stdout_header::impl]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 impl..fcgi::specification::stdout_header] The underlying type of a FastCGI header.
+
+ struct cgi::fcgi::spec_detail::Header::implementation_type impl;
+
+
+To guarantee the header is laid out exactly as we want, the structure must be a POD-type (see http://tinyurl.com/yo9eav).
+
+
+[endsect]
+
+
+
+[section:mutable_buffers_type fcgi::specification::stdout_header::mutable_buffers_type]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 mutable_buffers_type..fcgi::specification::stdout_header]
+
+ typedef boost::asio::mutable_buffers_1 mutable_buffers_type;
+
+
+
+
+[endsect]
+
+
+
+[section:padding_length fcgi::specification::stdout_header::padding_length]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 padding_length..fcgi::specification::stdout_header]
+
+ boost::uint16_t padding_length() const;
+
+
+
+[endsect]
+
+
+
+[section:request_id fcgi::specification::stdout_header::request_id]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 request_id..fcgi::specification::stdout_header]
+
+ boost::uint16_t request_id() const;
+
+
+
+[endsect]
+
+
+[section:reset fcgi::specification::stdout_header::reset]
+
+[indexterm2 reset..fcgi::specification::stdout_header]
+
+ void ``[link cgi.reference.fcgi__specification__stdout_header.reset.overload1 reset]``(
+ request_types t,
+ int id,
+ int len);
+
+ void ``[link cgi.reference.fcgi__specification__stdout_header.reset.overload2 reset]``(
+ int request_id,
+ int content_len);
+
+
+[section:overload1 fcgi::specification::stdout_header::reset (1 of 2 overloads)]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+
+
+ void reset(
+ request_types t,
+ int id,
+ int len);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::specification::stdout_header::reset (2 of 2 overloads)]
+
+
+
+ void reset(
+ int request_id,
+ int content_len);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:stdout_header fcgi::specification::stdout_header::stdout_header]
+
+[indexterm2 stdout_header..fcgi::specification::stdout_header]
+
+ ``[link cgi.reference.fcgi__specification__stdout_header.stdout_header.overload1 stdout_header]``(
+ int request_id,
+ int content_len);
+
+ ``[link cgi.reference.fcgi__specification__stdout_header.stdout_header.overload2 stdout_header]``();
+
+
+[section:overload1 fcgi::specification::stdout_header::stdout_header (1 of 2 overloads)]
+
+
+
+ stdout_header(
+ int request_id,
+ int content_len);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi::specification::stdout_header::stdout_header (2 of 2 overloads)]
+
+
+
+ stdout_header();
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:type fcgi::specification::stdout_header::type]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 type..fcgi::specification::stdout_header]
+
+ boost::uint16_t type() const;
+
+
+
+[endsect]
+
+
+
+[section:version fcgi::specification::stdout_header::version]
+
+
+['Inherited from fcgi::spec_detail::Header.]
+
+[indexterm2 version..fcgi::specification::stdout_header]
+
+ boost::uint16_t version() const;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:fcgi_request_acceptor_service fcgi_request_acceptor_service]
+
+The service class for FCGI basic_request_acceptor<>s.
+
+ template<
+ typename Protocol_ = common::fcgi_>
+ class fcgi_request_acceptor_service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi_request_acceptor_service.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi_request_acceptor_service.implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi_request_acceptor_service.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi_request_acceptor_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi_request_acceptor_service.service_impl_type [*service_impl_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.accept [*accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.assign [*assign]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.async_accept [*async_accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.default_init [*default_init]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.fcgi_request_acceptor_service [*fcgi_request_acceptor_service]]]
+ [The unique service identifier. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.native [*native]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.open [*open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.protocol_service [*protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.id [*id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi_request_acceptor_service.service_impl_ [*service_impl_]]]
+ []
+ ]
+
+]
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+
+[section:accept fcgi_request_acceptor_service::accept]
+
+[indexterm2 accept..fcgi_request_acceptor_service]
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ endpoint_type * ep,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:assign fcgi_request_acceptor_service::assign]
+
+[indexterm2 assign..fcgi_request_acceptor_service]
+
+ template<
+ typename Protocol >
+ boost::system::error_code assign(
+ implementation_type & impl,
+ Protocol protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:async_accept fcgi_request_acceptor_service::async_accept]
+
+[indexterm2 async_accept..fcgi_request_acceptor_service]
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Handler >
+ void async_accept(
+ implementation_type & impl,
+ CommonGatewayRequest & req,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:bind fcgi_request_acceptor_service::bind]
+
+[indexterm2 bind..fcgi_request_acceptor_service]
+
+ template<
+ typename Endpoint >
+ boost::system::error_code bind(
+ implementation_type & impl,
+ const Endpoint & endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[section:close fcgi_request_acceptor_service::close]
+
+[indexterm2 close..fcgi_request_acceptor_service]
+
+ boost::system::error_code ``[link cgi.reference.fcgi_request_acceptor_service.close.overload1 close]``(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+ void ``[link cgi.reference.fcgi_request_acceptor_service.close.overload2 close]``(
+ implementation_type & impl);
+
+
+[section:overload1 fcgi_request_acceptor_service::close (1 of 2 overloads)]
+
+
+
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 fcgi_request_acceptor_service::close (2 of 2 overloads)]
+
+
+
+ void close(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:construct fcgi_request_acceptor_service::construct]
+
+[indexterm2 construct..fcgi_request_acceptor_service]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:default_init fcgi_request_acceptor_service::default_init]
+
+[indexterm2 default_init..fcgi_request_acceptor_service]
+
+ boost::system::error_code default_init(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:destroy fcgi_request_acceptor_service::destroy]
+
+[indexterm2 destroy..fcgi_request_acceptor_service]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type fcgi_request_acceptor_service::endpoint_type]
+
+[indexterm2 endpoint_type..fcgi_request_acceptor_service]
+
+ typedef implementation_type::endpoint_type endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:fcgi_request_acceptor_service fcgi_request_acceptor_service::fcgi_request_acceptor_service]
+
+[indexterm2 fcgi_request_acceptor_service..fcgi_request_acceptor_service] The unique service identifier.
+
+ fcgi_request_acceptor_service(
+ common::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:id fcgi_request_acceptor_service::id]
+
+[indexterm2 id..fcgi_request_acceptor_service]
+
+ static boost::asio::detail::service_id< fcgi_request_acceptor_service< Protocol_ > > id;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type fcgi_request_acceptor_service::implementation_type]
+
+[indexterm2 implementation_type..fcgi_request_acceptor_service]
+
+ typedef service_impl_type::implementation_type implementation_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.port_number_type [*port_number_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.request_type [*request_type]]]
+ []
+
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.acceptor_ [*acceptor_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.endpoint_ [*endpoint_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.mutex_ [*mutex_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.port_num_ [*port_num_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.service_ [*service_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type.waiting_requests_ [*waiting_requests_]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:is_cgi fcgi_request_acceptor_service::is_cgi]
+
+[indexterm2 is_cgi..fcgi_request_acceptor_service]
+
+ bool is_cgi(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:is_open fcgi_request_acceptor_service::is_open]
+
+[indexterm2 is_open..fcgi_request_acceptor_service]
+
+ bool is_open(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:listen fcgi_request_acceptor_service::listen]
+
+[indexterm2 listen..fcgi_request_acceptor_service]
+
+ boost::system::error_code listen(
+ implementation_type & impl,
+ int backlog,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:local_endpoint fcgi_request_acceptor_service::local_endpoint]
+
+[indexterm2 local_endpoint..fcgi_request_acceptor_service]
+
+ implementation_type::endpoint_type local_endpoint(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:native fcgi_request_acceptor_service::native]
+
+[indexterm2 native..fcgi_request_acceptor_service]
+
+ service_impl_type::native_type native(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:native_type fcgi_request_acceptor_service::native_type]
+
+[indexterm2 native_type..fcgi_request_acceptor_service]
+
+ typedef service_impl_type::native_type native_type;
+
+
+
+
+[endsect]
+
+
+
+[section:open fcgi_request_acceptor_service::open]
+
+[indexterm2 open..fcgi_request_acceptor_service]
+
+ template<
+ typename Protocol >
+ boost::system::error_code open(
+ implementation_type & impl,
+ const Protocol & protocol,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_service fcgi_request_acceptor_service::protocol_service]
+
+[indexterm2 protocol_service..fcgi_request_acceptor_service]
+
+ service_impl_type::protocol_service_type & protocol_service(
+ implementation_type const & impl) const;
+
+
+
+[endsect]
+
+
+
+[section:protocol_type fcgi_request_acceptor_service::protocol_type]
+
+[indexterm2 protocol_type..fcgi_request_acceptor_service]
+
+ typedef implementation_type::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:service_impl_ fcgi_request_acceptor_service::service_impl_]
+
+[indexterm2 service_impl_..fcgi_request_acceptor_service]
+
+ service_impl_type service_impl_;
+
+
+
+[endsect]
+
+
+
+[section:service_impl_type fcgi_request_acceptor_service::service_impl_type]
+
+[indexterm2 service_impl_type..fcgi_request_acceptor_service]
+
+ typedef fcgi::acceptor_service_impl service_impl_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl__implementation_type [*implementation_type]]]
+ [The unique service identifier. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.fcgi__acceptor_service_impl.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.accept [*accept]]]
+ [Accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_impl [*acceptor_service_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.assign [*assign]]]
+ [Assign an existing native acceptor to a *socket* acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.async_accept [*async_accept]]]
+ [Asynchronously accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.check_for_waiting_request [*check_for_waiting_request]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.close [*close]]]
+ [Close the acceptor (not implemented yet). ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.default_init [*default_init]]]
+ [Default-initialize the acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.get_protocol_service [*get_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.is_cgi [*is_cgi]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.is_open [*is_open]]]
+ [Check if the given implementation is open. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.native [*native]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.open [*open]]]
+ [Open a new *socket* acceptor implementation. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.service [*service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.acceptor_service_ [*acceptor_service_]]]
+ [The underlying socket acceptor service. ]
+ ]
+
+ [
+ [[link cgi.reference.fcgi__acceptor_service_impl.id [*id]]]
+ []
+ ]
+
+]
+
+Note: this is near enough to being generic. It will hopefully translate directly to the fcgi\_acceptor\_service\_impl. In other words you would then have one acceptor\_service\_impl<>, so you'd use acceptor\_service\_impl<scgi> acceptor\_service\_impl\_; // and acceptor\_service\_impl<fcgi> acceptor\_service\_impl\_; // etc...
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+
+
+[endsect]
+
+
+
+[section:set_protocol_service fcgi_request_acceptor_service::set_protocol_service]
+
+[indexterm2 set_protocol_service..fcgi_request_acceptor_service]
+
+ template<
+ typename T >
+ void set_protocol_service(
+ implementation_type & impl,
+ T & ps);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service fcgi_request_acceptor_service::shutdown_service]
+
+[indexterm2 shutdown_service..fcgi_request_acceptor_service]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:request_acceptor_service request_acceptor_service]
+
+
+
+ template<
+ typename Protocol >
+ class request_acceptor_service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.request_acceptor_service.implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.request_acceptor_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.request_acceptor_service.accept [*accept]]]
+ [Accept a request. ]
+ ]
+
+ [
+ [[link cgi.reference.request_acceptor_service.async_accept [*async_accept]]]
+ [Asynchronously accept a request. ]
+ ]
+
+ [
+ [[link cgi.reference.request_acceptor_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.request_acceptor_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.request_acceptor_service.request_acceptor_service [*request_acceptor_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.request_acceptor_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.request_acceptor_service.id [*id]]]
+ []
+ ]
+
+]
+
+
+[section:accept request_acceptor_service::accept]
+
+[indexterm2 accept..request_acceptor_service] Accept a request.
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code & accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ boost::system::error_code & ec);
+
+
+Check if there is a waiting request in the queue. If not, accept a connection, and associate it with the request.
+
+
+[endsect]
+
+
+
+[section:async_accept request_acceptor_service::async_accept]
+
+[indexterm2 async_accept..request_acceptor_service] Asynchronously accept a request.
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Handler >
+ void async_accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:construct request_acceptor_service::construct]
+
+[indexterm2 construct..request_acceptor_service]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:destroy request_acceptor_service::destroy]
+
+[indexterm2 destroy..request_acceptor_service]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:id request_acceptor_service::id]
+
+[indexterm2 id..request_acceptor_service]
+
+ static boost::asio::detail::service_id< request_acceptor_service< Protocol > > id;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type request_acceptor_service::implementation_type]
+
+[indexterm2 implementation_type..request_acceptor_service]
+
+ typedef service_impl_type::impl_type implementation_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type request_acceptor_service::protocol_type]
+
+[indexterm2 protocol_type..request_acceptor_service]
+
+ typedef Protocol protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_acceptor_service request_acceptor_service::request_acceptor_service]
+
+[indexterm2 request_acceptor_service..request_acceptor_service]
+
+ request_acceptor_service(
+ basic_protocol_service< protocol_type > & s);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service request_acceptor_service::shutdown_service]
+
+[indexterm2 shutdown_service..request_acceptor_service]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:role__authorizer role::authorizer]
+
+
+
+ struct authorizer
+
+
+
+[endsect]
+
+[section:role__filter role::filter]
+
+
+
+ struct filter
+
+
+
+[endsect]
+
+[section:role__responder role::responder]
+
+
+
+ struct responder
+
+
+
+[endsect]
+
+
+[section:role_type role_type]
+
+[indexterm1 role_type]
+
+ enum role_type
+
+[heading Values]
+[variablelist
+
+ [
+ [none]
+ []
+ ]
+
+ [
+ [responder]
+ []
+ ]
+
+ [
+ [authorizer]
+ []
+ ]
+
+ [
+ [filter]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:scgi__acceptor scgi::acceptor]
+
+[indexterm1 scgi::acceptor] Typedef for common usage (SCGI).
+
+ typedef basic_request_acceptor< scgi_request_acceptor_service<> > acceptor;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.service_impl_type [*service_impl_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.accept [*accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.assign [*assign]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.async_accept [*async_accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.open [*open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.scgi_request_acceptor_service [*scgi_request_acceptor_service]]]
+ [The unique service identifier. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.id [*id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.service_impl_ [*service_impl_]]]
+ []
+ ]
+
+]
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+
+
+[endsect]
+
+
+[section:scgi__acceptor_service_impl scgi::acceptor_service_impl]
+
+The service_impl class for SCGI basic_request_acceptor<>s.
+
+ template<
+ typename Protocol_ = ::cgi::scgi_>
+ class acceptor_service_impl
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type [*implementation_type]]]
+ [The unique service identifier. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.accept [*accept]]]
+ [Accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_impl [*acceptor_service_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.assign [*assign]]]
+ [Assign an existing native acceptor to a *socket* acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.async_accept [*async_accept]]]
+ [Asynchronously accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.close [*close]]]
+ [Close the acceptor (not implemented yet). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.get_protocol_service [*get_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.is_open [*is_open]]]
+ [Check if the given implementation is open. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.open [*open]]]
+ [Open a new *socket* acceptor implementation. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_ [*acceptor_service_]]]
+ [The underlying socket acceptor service. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.id [*id]]]
+ []
+ ]
+
+]
+
+Note: this is near enough to being generic. It will hopefully translate directly to the fcgi\_acceptor\_service\_impl. In other words you would then have one acceptor\_service\_impl<>, so you'd use acceptor\_service\_impl<scgi> acceptor\_service\_impl\_; // and acceptor\_service\_impl<fcgi> acceptor\_service\_impl\_; // etc...
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+[section:accept scgi::acceptor_service_impl::accept]
+
+[indexterm2 accept..scgi::acceptor_service_impl] Accepts one request.
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Endpoint >
+ boost::system::error_code ``[link cgi.reference.scgi__acceptor_service_impl.accept.overload1 accept]``(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ Endpoint * endpoint,
+ boost::system::error_code & ec);
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code ``[link cgi.reference.scgi__acceptor_service_impl.accept.overload2 accept]``(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ boost::system::error_code & ec);
+
+
+[section:overload1 scgi::acceptor_service_impl::accept (1 of 2 overloads)]
+
+Accepts one request.
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Endpoint >
+ boost::system::error_code accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ Endpoint * endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 scgi::acceptor_service_impl::accept (2 of 2 overloads)]
+
+Accepts one request.
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:acceptor_service_ scgi::acceptor_service_impl::acceptor_service_]
+
+[indexterm2 acceptor_service_..scgi::acceptor_service_impl] The underlying socket acceptor service.
+
+ acceptor_service_type & acceptor_service_;
+
+
+
+[endsect]
+
+
+
+[section:acceptor_service_impl scgi::acceptor_service_impl::acceptor_service_impl]
+
+[indexterm2 acceptor_service_impl..scgi::acceptor_service_impl]
+
+ acceptor_service_impl(
+ ::cgi::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:acceptor_service_type scgi::acceptor_service_impl::acceptor_service_type]
+
+[indexterm2 acceptor_service_type..scgi::acceptor_service_impl]
+
+ typedef type::implementation_type::acceptor_service_type acceptor_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:assign scgi::acceptor_service_impl::assign]
+
+[indexterm2 assign..scgi::acceptor_service_impl] Assign an existing native acceptor to a *socket* acceptor.
+
+ boost::system::error_code assign(
+ implementation_type & impl,
+ const native_protocol_type & protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:async_accept scgi::acceptor_service_impl::async_accept]
+
+[indexterm2 async_accept..scgi::acceptor_service_impl] Asynchronously accepts one request.
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Handler >
+ void async_accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ Handler handler,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:bind scgi::acceptor_service_impl::bind]
+
+[indexterm2 bind..scgi::acceptor_service_impl]
+
+ template<
+ typename Endpoint >
+ boost::system::error_code bind(
+ implementation_type & impl,
+ const Endpoint & endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:close scgi::acceptor_service_impl::close]
+
+[indexterm2 close..scgi::acceptor_service_impl] Close the acceptor (not implemented yet).
+
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:construct scgi::acceptor_service_impl::construct]
+
+[indexterm2 construct..scgi::acceptor_service_impl]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:destroy scgi::acceptor_service_impl::destroy]
+
+[indexterm2 destroy..scgi::acceptor_service_impl]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:get_protocol_service scgi::acceptor_service_impl::get_protocol_service]
+
+[indexterm2 get_protocol_service..scgi::acceptor_service_impl]
+
+ protocol_service_type & get_protocol_service(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:id scgi::acceptor_service_impl::id]
+
+[indexterm2 id..scgi::acceptor_service_impl]
+
+ static boost::asio::detail::service_id< acceptor_service_impl< Protocol_ > > id;
+
+
+
+[endsect]
+
+
+
+[section:is_open scgi::acceptor_service_impl::is_open]
+
+[indexterm2 is_open..scgi::acceptor_service_impl] Check if the given implementation is open.
+
+ bool is_open(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:listen scgi::acceptor_service_impl::listen]
+
+[indexterm2 listen..scgi::acceptor_service_impl]
+
+ boost::system::error_code listen(
+ implementation_type & impl,
+ int backlog,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:local_endpoint scgi::acceptor_service_impl::local_endpoint]
+
+[indexterm2 local_endpoint..scgi::acceptor_service_impl]
+
+ implementation_type::endpoint_type local_endpoint(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:native_protocol_type scgi::acceptor_service_impl::native_protocol_type]
+
+[indexterm2 native_protocol_type..scgi::acceptor_service_impl]
+
+ typedef type::implementation_type::native_protocol_type native_protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:native_type scgi::acceptor_service_impl::native_type]
+
+[indexterm2 native_type..scgi::acceptor_service_impl]
+
+ typedef acceptor_service_type::native_type native_type;
+
+
+
+
+[endsect]
+
+
+
+[section:open scgi::acceptor_service_impl::open]
+
+[indexterm2 open..scgi::acceptor_service_impl] Open a new *socket* acceptor implementation.
+
+ boost::system::error_code open(
+ implementation_type & impl,
+ const native_protocol_type & protocol,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type scgi::acceptor_service_impl::protocol_service_type]
+
+[indexterm2 protocol_service_type..scgi::acceptor_service_impl]
+
+ typedef type::implementation_type::protocol_service_type protocol_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type scgi::acceptor_service_impl::protocol_type]
+
+[indexterm2 protocol_type..scgi::acceptor_service_impl]
+
+ typedef type::implementation_type::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:set_protocol_service scgi::acceptor_service_impl::set_protocol_service]
+
+[indexterm2 set_protocol_service..scgi::acceptor_service_impl]
+
+ void set_protocol_service(
+ implementation_type & impl,
+ protocol_service_type & ps);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service scgi::acceptor_service_impl::shutdown_service]
+
+[indexterm2 shutdown_service..scgi::acceptor_service_impl]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[section:type scgi::acceptor_service_impl::type]
+
+[indexterm2 type..scgi::acceptor_service_impl]
+
+ typedef acceptor_service_impl< Protocol_ > type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type [*implementation_type]]]
+ [The unique service identifier. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.accept [*accept]]]
+ [Accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_impl [*acceptor_service_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.assign [*assign]]]
+ [Assign an existing native acceptor to a *socket* acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.async_accept [*async_accept]]]
+ [Asynchronously accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.close [*close]]]
+ [Close the acceptor (not implemented yet). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.get_protocol_service [*get_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.is_open [*is_open]]]
+ [Check if the given implementation is open. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.open [*open]]]
+ [Open a new *socket* acceptor implementation. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_ [*acceptor_service_]]]
+ [The underlying socket acceptor service. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.id [*id]]]
+ []
+ ]
+
+]
+
+Note: this is near enough to being generic. It will hopefully translate directly to the fcgi\_acceptor\_service\_impl. In other words you would then have one acceptor\_service\_impl<>, so you'd use acceptor\_service\_impl<scgi> acceptor\_service\_impl\_; // and acceptor\_service\_impl<fcgi> acceptor\_service\_impl\_; // etc...
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:scgi__acceptor_service_impl__implementation_type scgi::acceptor_service_impl::implementation_type]
+
+The unique service identifier.
+
+ struct implementation_type
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.port_number_type [*port_number_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.request_type [*request_type]]]
+ []
+
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.acceptor_ [*acceptor_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.endpoint_ [*endpoint_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.mutex_ [*mutex_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.port_num_ [*port_num_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.service_ [*service_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.waiting_requests_ [*waiting_requests_]]]
+ []
+ ]
+
+]
+
+
+[section:acceptor_ scgi::acceptor_service_impl::implementation_type::acceptor_]
+
+[indexterm2 acceptor_..scgi::acceptor_service_impl::implementation_type]
+
+ acceptor_service_type::implementation_type acceptor_;
+
+
+
+[endsect]
+
+
+
+[section:acceptor_service_type scgi::acceptor_service_impl::implementation_type::acceptor_service_type]
+
+[indexterm2 acceptor_service_type..scgi::acceptor_service_impl::implementation_type]
+
+ typedef boost::asio::socket_acceptor_service< native_protocol_type > acceptor_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:endpoint_ scgi::acceptor_service_impl::implementation_type::endpoint_]
+
+[indexterm2 endpoint_..scgi::acceptor_service_impl::implementation_type]
+
+ endpoint_type endpoint_;
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type scgi::acceptor_service_impl::implementation_type::endpoint_type]
+
+[indexterm2 endpoint_type..scgi::acceptor_service_impl::implementation_type]
+
+ typedef boost::asio::ip::tcp::endpoint endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:mutex_ scgi::acceptor_service_impl::implementation_type::mutex_]
+
+[indexterm2 mutex_..scgi::acceptor_service_impl::implementation_type]
+
+ boost::mutex mutex_;
+
+
+
+[endsect]
+
+
+
+[section:native_protocol_type scgi::acceptor_service_impl::implementation_type::native_protocol_type]
+
+[indexterm2 native_protocol_type..scgi::acceptor_service_impl::implementation_type]
+
+ typedef boost::asio::ip::tcp native_protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:port_num_ scgi::acceptor_service_impl::implementation_type::port_num_]
+
+[indexterm2 port_num_..scgi::acceptor_service_impl::implementation_type]
+
+ port_number_type port_num_;
+
+
+
+[endsect]
+
+
+
+[section:port_number_type scgi::acceptor_service_impl::implementation_type::port_number_type]
+
+[indexterm2 port_number_type..scgi::acceptor_service_impl::implementation_type]
+
+ typedef unsigned short port_number_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_service_type scgi::acceptor_service_impl::implementation_type::protocol_service_type]
+
+[indexterm2 protocol_service_type..scgi::acceptor_service_impl::implementation_type]
+
+ typedef basic_protocol_service< protocol_type > protocol_service_type;
+
+
+
+
+[endsect]
+
+
+
+[section:protocol_type scgi::acceptor_service_impl::implementation_type::protocol_type]
+
+[indexterm2 protocol_type..scgi::acceptor_service_impl::implementation_type]
+
+ typedef Protocol_ protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_type scgi::acceptor_service_impl::implementation_type::request_type]
+
+[indexterm2 request_type..scgi::acceptor_service_impl::implementation_type]
+
+ typedef scgi::request request_type;
+
+
+
+
+[endsect]
+
+
+
+[section:service_ scgi::acceptor_service_impl::implementation_type::service_]
+
+[indexterm2 service_..scgi::acceptor_service_impl::implementation_type]
+
+ protocol_service_type * service_;
+
+
+
+[endsect]
+
+
+
+[section:waiting_requests_ scgi::acceptor_service_impl::implementation_type::waiting_requests_]
+
+[indexterm2 waiting_requests_..scgi::acceptor_service_impl::implementation_type]
+
+ std::queue< boost::shared_ptr< request_type > > waiting_requests_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:scgi__request scgi::request]
+
+[indexterm1 scgi::request]
+
+ typedef basic_request< scgi_request_service, service > request;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type [*implementation_type]]]
+ [The actual implementation date for an SCGI request. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.GET [*GET]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.POST [*POST]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.client [*client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.close [*close]]]
+ [Close the request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.cookie [*cookie]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.env [*env]]]
+ [Find the environment meta-variable matching name. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.load [*load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.scgi_request_service [*scgi_request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service._scgi_request_service [*~scgi_request_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_one_post_var [*parse_one_post_var]]]
+ [Read and parse a single cgi POST meta variable (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.var [*var]]]
+ [Extract the var value from. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.id [*id]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+[section:scgi__scgi_request_impl scgi::scgi_request_impl]
+
+The implementation_type for scgi_request_service.
+
+ class scgi_request_impl
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_impl.client_type [*client_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_impl.connection_ptr [*connection_ptr]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_impl.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_impl.map_type [*map_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_impl.connection [*connection]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_impl.scgi_request_impl [*scgi_request_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_impl._scgi_request_impl [*~scgi_request_impl]]]
+ []
+ ]
+
+]
+
+
+[section:client_type scgi::scgi_request_impl::client_type]
+
+[indexterm2 client_type..scgi::scgi_request_impl]
+
+ typedef ::cgi::basic_client< connection_type > client_type;
+
+
+
+
+[endsect]
+
+
+
+[section:connection scgi::scgi_request_impl::connection]
+
+[indexterm2 connection..scgi::scgi_request_impl]
+
+ connection_ptr connection();
+
+
+
+[endsect]
+
+
+
+[section:connection_ptr scgi::scgi_request_impl::connection_ptr]
+
+[indexterm2 connection_ptr..scgi::scgi_request_impl]
+
+ typedef connection_type::pointer connection_ptr;
+
+
+
+
+[endsect]
+
+
+
+[section:connection_type scgi::scgi_request_impl::connection_type]
+
+[indexterm2 connection_type..scgi::scgi_request_impl]
+
+ typedef tcp_connection connection_type;
+
+
+
+
+[endsect]
+
+
+
+[section:map_type scgi::scgi_request_impl::map_type]
+
+[indexterm2 map_type..scgi::scgi_request_impl]
+
+ typedef cgi::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:scgi_request_impl scgi::scgi_request_impl::scgi_request_impl]
+
+[indexterm2 scgi_request_impl..scgi::scgi_request_impl]
+
+ scgi_request_impl();
+
+
+
+[endsect]
+
+
+
+[section:_scgi_request_impl scgi::scgi_request_impl::~scgi_request_impl]
+
+[indexterm2 ~scgi_request_impl..scgi::scgi_request_impl]
+
+ ~scgi_request_impl();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:scgi__scgi_request_service scgi::scgi_request_service]
+
+The IoObjectService class for a SCGI basic_request<>s.
+
+ class scgi_request_service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type [*implementation_type]]]
+ [The actual implementation date for an SCGI request. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.GET [*GET]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.POST [*POST]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.client [*client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.close [*close]]]
+ [Close the request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.cookie [*cookie]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.env [*env]]]
+ [Find the environment meta-variable matching name. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.load [*load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.scgi_request_service [*scgi_request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service._scgi_request_service [*~scgi_request_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_one_post_var [*parse_one_post_var]]]
+ [Read and parse a single cgi POST meta variable (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.var [*var]]]
+ [Extract the var value from. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.id [*id]]]
+ []
+ ]
+
+]
+
+[section:GET scgi::scgi_request_service::GET]
+
+[indexterm2 GET..scgi::scgi_request_service]
+
+ map_type & ``[link cgi.reference.scgi__scgi_request_service.GET.overload1 GET]``(
+ implementation_type & impl);
+
+ std::string ``[link cgi.reference.scgi__scgi_request_service.GET.overload2 GET]``(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+[section:overload1 scgi::scgi_request_service::GET (1 of 2 overloads)]
+
+
+
+ map_type & GET(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:overload2 scgi::scgi_request_service::GET (2 of 2 overloads)]
+
+
+
+ std::string GET(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:POST scgi::scgi_request_service::POST]
+
+[indexterm2 POST..scgi::scgi_request_service]
+
+ map_type & ``[link cgi.reference.scgi__scgi_request_service.POST.overload1 POST]``(
+ implementation_type & impl);
+
+ std::string ``[link cgi.reference.scgi__scgi_request_service.POST.overload2 POST]``(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec,
+ bool greedy = true);
+
+
+[section:overload1 scgi::scgi_request_service::POST (1 of 2 overloads)]
+
+
+
+ map_type & POST(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:overload2 scgi::scgi_request_service::POST (2 of 2 overloads)]
+
+Find the post meta-variable matching name.
+
+ std::string POST(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec,
+ bool greedy = true);
+
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[greedy][This determines whether more data can be read to find the variable. The default is true to cause least surprise in the common case of having not parsed any of the POST data.]]
+
+]
+
+----------------------------------------------- Should this return a pair of iterators instead? What about url\_decoding? -----------------------------------------------
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:client scgi::scgi_request_service::client]
+
+[indexterm2 client..scgi::scgi_request_service]
+
+ implementation_type::client_type & client(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:close scgi::scgi_request_service::close]
+
+[indexterm2 close..scgi::scgi_request_service] Close the request.
+
+ int close(
+ implementation_type & impl,
+ http::status_code & hsc,
+ int program_status);
+
+
+
+[endsect]
+
+
+
+[section:construct scgi::scgi_request_service::construct]
+
+[indexterm2 construct..scgi::scgi_request_service]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+[section:cookie scgi::scgi_request_service::cookie]
+
+[indexterm2 cookie..scgi::scgi_request_service]
+
+ map_type & ``[link cgi.reference.scgi__scgi_request_service.cookie.overload1 cookie]``(
+ implementation_type & impl);
+
+ std::string ``[link cgi.reference.scgi__scgi_request_service.cookie.overload2 cookie]``(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+[section:overload1 scgi::scgi_request_service::cookie (1 of 2 overloads)]
+
+
+
+ map_type & cookie(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:overload2 scgi::scgi_request_service::cookie (2 of 2 overloads)]
+
+Find the cookie meta-variable matching name.
+
+ std::string cookie(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:destroy scgi::scgi_request_service::destroy]
+
+[indexterm2 destroy..scgi::scgi_request_service]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:env scgi::scgi_request_service::env]
+
+[indexterm2 env..scgi::scgi_request_service] Find the environment meta-variable matching name.
+
+ std::string env(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:get_role scgi::scgi_request_service::get_role]
+
+[indexterm2 get_role..scgi::scgi_request_service]
+
+ role_type get_role(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:id scgi::scgi_request_service::id]
+
+[indexterm2 id..scgi::scgi_request_service]
+
+ static boost::asio::detail::service_id< scgi_request_service > id;
+
+
+
+[endsect]
+
+
+
+[section:is_open scgi::scgi_request_service::is_open]
+
+[indexterm2 is_open..scgi::scgi_request_service]
+
+ bool is_open(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:load scgi::scgi_request_service::load]
+
+[indexterm2 load..scgi::scgi_request_service]
+
+ boost::system::error_code & load(
+ implementation_type & impl,
+ bool parse_stdin,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:map_type scgi::scgi_request_service::map_type]
+
+[indexterm2 map_type..scgi::scgi_request_service]
+
+ typedef type::implementation_type::map_type map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:parse_cookie_vars scgi::scgi_request_service::parse_cookie_vars]
+
+[indexterm2 parse_cookie_vars..scgi::scgi_request_service] Read and parse the HTTP_COOKIE meta variable.
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code & parse_cookie_vars(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_get_vars scgi::scgi_request_service::parse_get_vars]
+
+[indexterm2 parse_get_vars..scgi::scgi_request_service] Read and parse the cgi GET meta variables.
+
+ boost::system::error_code & parse_get_vars(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_one_post_var scgi::scgi_request_service::parse_one_post_var]
+
+[indexterm2 parse_one_post_var..scgi::scgi_request_service] Read and parse a single cgi POST meta variable (greedily).
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code & parse_one_post_var(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_post_vars scgi::scgi_request_service::parse_post_vars]
+
+[indexterm2 parse_post_vars..scgi::scgi_request_service] Read and parse the cgi POST meta variables (greedily).
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code & parse_post_vars(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type scgi::scgi_request_service::protocol_type]
+
+[indexterm2 protocol_type..scgi::scgi_request_service]
+
+ typedef type::implementation_type::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:scgi_request_service scgi::scgi_request_service::scgi_request_service]
+
+[indexterm2 scgi_request_service..scgi::scgi_request_service]
+
+ scgi_request_service(
+ ::cgi::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service scgi::scgi_request_service::shutdown_service]
+
+[indexterm2 shutdown_service..scgi::scgi_request_service]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[section:type scgi::scgi_request_service::type]
+
+[indexterm2 type..scgi::scgi_request_service]
+
+ typedef scgi_request_service type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type [*implementation_type]]]
+ [The actual implementation date for an SCGI request. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.GET [*GET]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.POST [*POST]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.client [*client]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.close [*close]]]
+ [Close the request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.cookie [*cookie]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.env [*env]]]
+ [Find the environment meta-variable matching name. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.load [*load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.scgi_request_service [*scgi_request_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service._scgi_request_service [*~scgi_request_service]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_one_post_var [*parse_one_post_var]]]
+ [Read and parse a single cgi POST meta variable (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.var [*var]]]
+ [Extract the var value from. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service.id [*id]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:var scgi::scgi_request_service::var]
+
+[indexterm2 var..scgi::scgi_request_service] Extract the var value from.
+
+ std::string var(
+ map_type & _data,
+ const std::string & _name,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:_scgi_request_service scgi::scgi_request_service::~scgi_request_service]
+
+[indexterm2 ~scgi_request_service..scgi::scgi_request_service]
+
+ ~scgi_request_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:scgi__scgi_request_service__implementation_type scgi::scgi_request_service::implementation_type]
+
+The actual implementation date for an SCGI request.
+
+ struct implementation_type
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.client_type [*client_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.connection_type [*connection_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.implementation_type [*implementation_type]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.all_done_ [*all_done_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.client_ [*client_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.cookie_vars_ [*cookie_vars_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.env_vars_ [*env_vars_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.get_vars_ [*get_vars_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.http_status_ [*http_status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.null_str_ [*null_str_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.post_vars_ [*post_vars_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.request_status_ [*request_status_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__scgi_request_service__implementation_type.stdin_parsed_ [*stdin_parsed_]]]
+ []
+ ]
+
+]
+
+
+[section:all_done_ scgi::scgi_request_service::implementation_type::all_done_]
+
+[indexterm2 all_done_..scgi::scgi_request_service::implementation_type]
+
+ bool all_done_;
+
+
+
+[endsect]
+
+
+
+[section:client_ scgi::scgi_request_service::implementation_type::client_]
+
+[indexterm2 client_..scgi::scgi_request_service::implementation_type]
+
+ client_type client_;
+
+
+
+[endsect]
+
+
+
+[section:client_type scgi::scgi_request_service::implementation_type::client_type]
+
+[indexterm2 client_type..scgi::scgi_request_service::implementation_type]
+
+ typedef basic_client< connection_type, protocol_type > client_type;
+
+
+
+
+[endsect]
+
+
+
+[section:connection_type scgi::scgi_request_service::implementation_type::connection_type]
+
+[indexterm2 connection_type..scgi::scgi_request_service::implementation_type]
+
+ typedef tcp_connection connection_type;
+
+
+
+
+[endsect]
+
+
+
+[section:cookie_vars_ scgi::scgi_request_service::implementation_type::cookie_vars_]
+
+[indexterm2 cookie_vars_..scgi::scgi_request_service::implementation_type]
+
+ map_type cookie_vars_;
+
+
+
+[endsect]
+
+
+
+[section:env_vars_ scgi::scgi_request_service::implementation_type::env_vars_]
+
+[indexterm2 env_vars_..scgi::scgi_request_service::implementation_type]
+
+ map_type env_vars_;
+
+
+
+[endsect]
+
+
+
+[section:get_vars_ scgi::scgi_request_service::implementation_type::get_vars_]
+
+[indexterm2 get_vars_..scgi::scgi_request_service::implementation_type]
+
+ map_type get_vars_;
+
+
+
+[endsect]
+
+
+
+[section:http_status_ scgi::scgi_request_service::implementation_type::http_status_]
+
+[indexterm2 http_status_..scgi::scgi_request_service::implementation_type]
+
+ http::status_code http_status_;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type scgi::scgi_request_service::implementation_type::implementation_type]
+
+[indexterm2 implementation_type..scgi::scgi_request_service::implementation_type]
+
+ implementation_type();
+
+
+
+[endsect]
+
+
+
+[section:map_type scgi::scgi_request_service::implementation_type::map_type]
+
+[indexterm2 map_type..scgi::scgi_request_service::implementation_type]
+
+ typedef ::cgi::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:null_str_ scgi::scgi_request_service::implementation_type::null_str_]
+
+[indexterm2 null_str_..scgi::scgi_request_service::implementation_type]
+
+ std::string null_str_;
+
+
+
+[endsect]
+
+
+
+[section:post_vars_ scgi::scgi_request_service::implementation_type::post_vars_]
+
+[indexterm2 post_vars_..scgi::scgi_request_service::implementation_type]
+
+ map_type post_vars_;
+
+
+
+[endsect]
+
+
+
+[section:protocol_type scgi::scgi_request_service::implementation_type::protocol_type]
+
+[indexterm2 protocol_type..scgi::scgi_request_service::implementation_type]
+
+ typedef ::cgi::scgi_ protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:request_status_ scgi::scgi_request_service::implementation_type::request_status_]
+
+[indexterm2 request_status_..scgi::scgi_request_service::implementation_type]
+
+ status_type request_status_;
+
+
+
+[endsect]
+
+
+
+[section:stdin_parsed_ scgi::scgi_request_service::implementation_type::stdin_parsed_]
+
+[indexterm2 stdin_parsed_..scgi::scgi_request_service::implementation_type]
+
+ bool stdin_parsed_;
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+
+[section:scgi__service scgi::service]
+
+[indexterm1 scgi::service]
+
+ typedef basic_protocol_service< ::cgi::scgi_ > service;
+
+
+
+
+[endsect]
+
+
+[section:scgi_request_acceptor_service scgi_request_acceptor_service]
+
+The service class for SCGI basic_request_acceptor<>s.
+
+ template<
+ typename Protocol_ = scgi_>
+ class scgi_request_acceptor_service
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_acceptor_service.service_impl_type [*service_impl_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.accept [*accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.assign [*assign]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.async_accept [*async_accept]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.close [*close]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.is_open [*is_open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.open [*open]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.scgi_request_acceptor_service [*scgi_request_acceptor_service]]]
+ [The unique service identifier. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.id [*id]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_acceptor_service.service_impl_ [*service_impl_]]]
+ []
+ ]
+
+]
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+[section:accept scgi_request_acceptor_service::accept]
+
+[indexterm2 accept..scgi_request_acceptor_service]
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Endpoint >
+ boost::system::error_code ``[link cgi.reference.scgi_request_acceptor_service.accept.overload1 accept]``(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ Endpoint * ep,
+ boost::system::error_code & ec);
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code ``[link cgi.reference.scgi_request_acceptor_service.accept.overload2 accept]``(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ boost::system::error_code & ec);
+
+
+[section:overload1 scgi_request_acceptor_service::accept (1 of 2 overloads)]
+
+
+
+ template<
+ typename CommonGatewayRequest ,
+ typename Endpoint >
+ boost::system::error_code accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ Endpoint * ep,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 scgi_request_acceptor_service::accept (2 of 2 overloads)]
+
+
+
+ template<
+ typename CommonGatewayRequest >
+ boost::system::error_code accept(
+ implementation_type & impl,
+ CommonGatewayRequest & request,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:assign scgi_request_acceptor_service::assign]
+
+[indexterm2 assign..scgi_request_acceptor_service]
+
+ template<
+ typename Protocol >
+ boost::system::error_code assign(
+ implementation_type & impl,
+ Protocol protocol,
+ const native_type & native_acceptor,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:async_accept scgi_request_acceptor_service::async_accept]
+
+[indexterm2 async_accept..scgi_request_acceptor_service]
+
+ template<
+ typename Handler >
+ void async_accept(
+ implementation_type & impl,
+ Handler handler);
+
+
+
+[endsect]
+
+
+
+[section:bind scgi_request_acceptor_service::bind]
+
+[indexterm2 bind..scgi_request_acceptor_service]
+
+ template<
+ typename Endpoint >
+ boost::system::error_code bind(
+ implementation_type & impl,
+ const Endpoint & endpoint,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[section:close scgi_request_acceptor_service::close]
+
+[indexterm2 close..scgi_request_acceptor_service]
+
+ boost::system::error_code ``[link cgi.reference.scgi_request_acceptor_service.close.overload1 close]``(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+ void ``[link cgi.reference.scgi_request_acceptor_service.close.overload2 close]``(
+ implementation_type & impl);
+
+
+[section:overload1 scgi_request_acceptor_service::close (1 of 2 overloads)]
+
+
+
+ boost::system::error_code close(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:overload2 scgi_request_acceptor_service::close (2 of 2 overloads)]
+
+
+
+ void close(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:construct scgi_request_acceptor_service::construct]
+
+[indexterm2 construct..scgi_request_acceptor_service]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:destroy scgi_request_acceptor_service::destroy]
+
+[indexterm2 destroy..scgi_request_acceptor_service]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:endpoint_type scgi_request_acceptor_service::endpoint_type]
+
+[indexterm2 endpoint_type..scgi_request_acceptor_service]
+
+ typedef implementation_type::endpoint_type endpoint_type;
+
+
+
+
+[endsect]
+
+
+
+[section:id scgi_request_acceptor_service::id]
+
+[indexterm2 id..scgi_request_acceptor_service]
+
+ static boost::asio::detail::service_id< scgi_request_acceptor_service< Protocol_ > > id;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type scgi_request_acceptor_service::implementation_type]
+
+[indexterm2 implementation_type..scgi_request_acceptor_service]
+
+ typedef service_impl_type::implementation_type implementation_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.endpoint_type [*endpoint_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.port_number_type [*port_number_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.request_type [*request_type]]]
+ []
+
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.acceptor_ [*acceptor_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.endpoint_ [*endpoint_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.mutex_ [*mutex_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.port_num_ [*port_num_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.service_ [*service_]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type.waiting_requests_ [*waiting_requests_]]]
+ []
+ ]
+
+]
+
+
+
+[endsect]
+
+
+
+[section:is_open scgi_request_acceptor_service::is_open]
+
+[indexterm2 is_open..scgi_request_acceptor_service]
+
+ bool is_open(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:listen scgi_request_acceptor_service::listen]
+
+[indexterm2 listen..scgi_request_acceptor_service]
+
+ boost::system::error_code listen(
+ implementation_type & impl,
+ int backlog,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:local_endpoint scgi_request_acceptor_service::local_endpoint]
+
+[indexterm2 local_endpoint..scgi_request_acceptor_service]
+
+ implementation_type::endpoint_type local_endpoint(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:native_type scgi_request_acceptor_service::native_type]
+
+[indexterm2 native_type..scgi_request_acceptor_service]
+
+ typedef service_impl_type::native_type native_type;
+
+
+
+
+[endsect]
+
+
+
+[section:open scgi_request_acceptor_service::open]
+
+[indexterm2 open..scgi_request_acceptor_service]
+
+ template<
+ typename Protocol >
+ boost::system::error_code open(
+ implementation_type & impl,
+ const Protocol & protocol,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type scgi_request_acceptor_service::protocol_type]
+
+[indexterm2 protocol_type..scgi_request_acceptor_service]
+
+ typedef implementation_type::protocol_type protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:scgi_request_acceptor_service scgi_request_acceptor_service::scgi_request_acceptor_service]
+
+[indexterm2 scgi_request_acceptor_service..scgi_request_acceptor_service] The unique service identifier.
+
+ scgi_request_acceptor_service(
+ ::cgi::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:service_impl_ scgi_request_acceptor_service::service_impl_]
+
+[indexterm2 service_impl_..scgi_request_acceptor_service]
+
+ service_impl_type service_impl_;
+
+
+
+[endsect]
+
+
+
+[section:service_impl_type scgi_request_acceptor_service::service_impl_type]
+
+[indexterm2 service_impl_type..scgi_request_acceptor_service]
+
+ typedef scgi::acceptor_service_impl service_impl_type;
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_type [*acceptor_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl__implementation_type [*implementation_type]]]
+ [The unique service identifier. ]
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.native_protocol_type [*native_protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.native_type [*native_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.protocol_service_type [*protocol_service_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi__acceptor_service_impl.type [*type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.accept [*accept]]]
+ [Accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_impl [*acceptor_service_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.assign [*assign]]]
+ [Assign an existing native acceptor to a *socket* acceptor. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.async_accept [*async_accept]]]
+ [Asynchronously accepts one request. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.bind [*bind]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.close [*close]]]
+ [Close the acceptor (not implemented yet). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.get_protocol_service [*get_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.is_open [*is_open]]]
+ [Check if the given implementation is open. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.listen [*listen]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.local_endpoint [*local_endpoint]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.open [*open]]]
+ [Open a new *socket* acceptor implementation. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.set_protocol_service [*set_protocol_service]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.shutdown_service [*shutdown_service]]]
+ []
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.acceptor_service_ [*acceptor_service_]]]
+ [The underlying socket acceptor service. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi__acceptor_service_impl.id [*id]]]
+ []
+ ]
+
+]
+
+Note: this is near enough to being generic. It will hopefully translate directly to the fcgi\_acceptor\_service\_impl. In other words you would then have one acceptor\_service\_impl<>, so you'd use acceptor\_service\_impl<scgi> acceptor\_service\_impl\_; // and acceptor\_service\_impl<fcgi> acceptor\_service\_impl\_; // etc...
+
+Note: If the protocol is an asynchronous protocol, which means it requires access to a boost::asio::io\_service instance, then this class becomes a model of the Service concept (**LINK**) and must only use the constructor which takes a ProtocolService (**LINK**). If the protocol isn't async then the class can be used without a ProtocolService.
+
+
+
+[endsect]
+
+
+
+[section:set_protocol_service scgi_request_acceptor_service::set_protocol_service]
+
+[indexterm2 set_protocol_service..scgi_request_acceptor_service]
+
+ template<
+ typename T >
+ void set_protocol_service(
+ implementation_type & impl,
+ T & ps);
+
+
+
+[endsect]
+
+
+
+[section:shutdown_service scgi_request_acceptor_service::shutdown_service]
+
+[indexterm2 shutdown_service..scgi_request_acceptor_service]
+
+ void shutdown_service();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[section:scgi_request_service_impl scgi_request_service_impl]
+
+
+
+ class scgi_request_service_impl
+
+
+[heading Types]
+[table
+ [[Name][Description]]
+
+ [
+
+ [[link cgi.reference.scgi_request_service_impl.implementation_type [*implementation_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_service_impl.map_type [*map_type]]]
+ []
+
+ ]
+
+ [
+
+ [[link cgi.reference.scgi_request_service_impl.protocol_type [*protocol_type]]]
+ []
+
+ ]
+
+]
+
+[heading Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.construct [*construct]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.cookie [*cookie]]]
+ [Find the cookie meta-variable matching name. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.destroy [*destroy]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.get_role [*get_role]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.load [*load]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.meta_cookie [*meta_cookie]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.meta_env [*meta_env]]]
+ [Find the environment meta-variable matching name. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.meta_get [*meta_get]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.meta_post [*meta_post]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.read_some [*read_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.scgi_request_service_impl [*scgi_request_service_impl]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.write_some [*write_some]]]
+ []
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl._scgi_request_service_impl [*~scgi_request_service_impl]]]
+ []
+ ]
+
+]
+
+[heading Protected Member Functions]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.parse_cookie_vars [*parse_cookie_vars]]]
+ [Read and parse the HTTP_COOKIE meta variable. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.parse_get_vars [*parse_get_vars]]]
+ [Read and parse the cgi GET meta variables. ]
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.parse_one_post_var [*parse_one_post_var]]]
+ [Read and parse a single cgi POST meta variable (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.parse_post_vars [*parse_post_vars]]]
+ [Read and parse the cgi POST meta variables (greedily). ]
+ ]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.var [*var]]]
+ [Extract the var value from. ]
+ ]
+
+]
+
+[heading Data Members]
+[table
+ [[Name][Description]]
+
+ [
+ [[link cgi.reference.scgi_request_service_impl.id [*id]]]
+ []
+ ]
+
+]
+
+
+[section:construct scgi_request_service_impl::construct]
+
+[indexterm2 construct..scgi_request_service_impl]
+
+ void construct(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:cookie scgi_request_service_impl::cookie]
+
+[indexterm2 cookie..scgi_request_service_impl] Find the cookie meta-variable matching name.
+
+ std::string cookie(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:destroy scgi_request_service_impl::destroy]
+
+[indexterm2 destroy..scgi_request_service_impl]
+
+ void destroy(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:get_role scgi_request_service_impl::get_role]
+
+[indexterm2 get_role..scgi_request_service_impl]
+
+ role_type get_role(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:id scgi_request_service_impl::id]
+
+[indexterm2 id..scgi_request_service_impl]
+
+ static boost::asio::detail::service_id< scgi_service_impl > id;
+
+
+
+[endsect]
+
+
+
+[section:implementation_type scgi_request_service_impl::implementation_type]
+
+[indexterm2 implementation_type..scgi_request_service_impl]
+
+ typedef scgi_request_impl implementation_type;
+
+
+
+
+[endsect]
+
+
+
+[section:load scgi_request_service_impl::load]
+
+[indexterm2 load..scgi_request_service_impl]
+
+ boost::system::error_code & load(
+ implementation_type & impl,
+ bool parse_stdin,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:map_type scgi_request_service_impl::map_type]
+
+[indexterm2 map_type..scgi_request_service_impl]
+
+ typedef cgi::map map_type;
+
+
+
+
+[endsect]
+
+
+
+[section:meta_cookie scgi_request_service_impl::meta_cookie]
+
+[indexterm2 meta_cookie..scgi_request_service_impl]
+
+ map_type & meta_cookie(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:meta_env scgi_request_service_impl::meta_env]
+
+[indexterm2 meta_env..scgi_request_service_impl] Find the environment meta-variable matching name.
+
+ std::string meta_env(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[section:meta_get scgi_request_service_impl::meta_get]
+
+[indexterm2 meta_get..scgi_request_service_impl]
+
+ map_type & ``[link cgi.reference.scgi_request_service_impl.meta_get.overload1 meta_get]``(
+ implementation_type & impl);
+
+ std::string ``[link cgi.reference.scgi_request_service_impl.meta_get.overload2 meta_get]``(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+[section:overload1 scgi_request_service_impl::meta_get (1 of 2 overloads)]
+
+
+
+ map_type & meta_get(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:overload2 scgi_request_service_impl::meta_get (2 of 2 overloads)]
+
+
+
+ std::string meta_get(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+[endsect]
+
+[section:meta_post scgi_request_service_impl::meta_post]
+
+[indexterm2 meta_post..scgi_request_service_impl]
+
+ map_type & ``[link cgi.reference.scgi_request_service_impl.meta_post.overload1 meta_post]``(
+ implementation_type & impl);
+
+ std::string ``[link cgi.reference.scgi_request_service_impl.meta_post.overload2 meta_post]``(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec,
+ bool greedy = true);
+
+
+[section:overload1 scgi_request_service_impl::meta_post (1 of 2 overloads)]
+
+
+
+ map_type & meta_post(
+ implementation_type & impl);
+
+
+
+[endsect]
+
+
+
+[section:overload2 scgi_request_service_impl::meta_post (2 of 2 overloads)]
+
+Find the post meta-variable matching name.
+
+ std::string meta_post(
+ implementation_type & impl,
+ const std::string & name,
+ boost::system::error_code & ec,
+ bool greedy = true);
+
+
+
+[heading Parameters]
+
+
+[variablelist
+
+[[greedy][This determines whether more data can be read to find the variable. The default is true to cause least surprise in the common case of having not parsed any of the POST data.]]
+
+]
+
+----------------------------------------------- Should this return a pair of iterators instead? What about url\_decoding? -----------------------------------------------
+
+
+[endsect]
+
+
+[endsect]
+
+
+[section:parse_cookie_vars scgi_request_service_impl::parse_cookie_vars]
+
+[indexterm2 parse_cookie_vars..scgi_request_service_impl] Read and parse the HTTP_COOKIE meta variable.
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code & parse_cookie_vars(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_get_vars scgi_request_service_impl::parse_get_vars]
+
+[indexterm2 parse_get_vars..scgi_request_service_impl] Read and parse the cgi GET meta variables.
+
+ boost::system::error_code & parse_get_vars(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_one_post_var scgi_request_service_impl::parse_one_post_var]
+
+[indexterm2 parse_one_post_var..scgi_request_service_impl] Read and parse a single cgi POST meta variable (greedily).
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code & parse_one_post_var(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:parse_post_vars scgi_request_service_impl::parse_post_vars]
+
+[indexterm2 parse_post_vars..scgi_request_service_impl] Read and parse the cgi POST meta variables (greedily).
+
+ template<
+ typename RequestImpl >
+ boost::system::error_code & parse_post_vars(
+ implementation_type & impl,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:protocol_type scgi_request_service_impl::protocol_type]
+
+[indexterm2 protocol_type..scgi_request_service_impl]
+
+ typedef tags::scgi protocol_type;
+
+
+
+
+[endsect]
+
+
+
+[section:read_some scgi_request_service_impl::read_some]
+
+[indexterm2 read_some..scgi_request_service_impl]
+
+ template<
+ typename MutableBufferSequence >
+ std::size_t read_some(
+ implementation_type & impl,
+ const MutableBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:scgi_request_service_impl scgi_request_service_impl::scgi_request_service_impl]
+
+[indexterm2 scgi_request_service_impl..scgi_request_service_impl]
+
+ scgi_request_service_impl(
+ cgi::io_service & ios);
+
+
+
+[endsect]
+
+
+
+[section:var scgi_request_service_impl::var]
+
+[indexterm2 var..scgi_request_service_impl] Extract the var value from.
+
+ std::string var(
+ map_type & meta_data,
+ const std::string & name,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:write_some scgi_request_service_impl::write_some]
+
+[indexterm2 write_some..scgi_request_service_impl]
+
+ template<
+ typename ConstBufferSequence >
+ std::size_t write_some(
+ implementation_type & impl,
+ const ConstBufferSequence & buf,
+ boost::system::error_code & ec);
+
+
+
+[endsect]
+
+
+
+[section:_scgi_request_service_impl scgi_request_service_impl::~scgi_request_service_impl]
+
+[indexterm2 ~scgi_request_service_impl..scgi_request_service_impl]
+
+ ~scgi_request_service_impl();
+
+
+
+[endsect]
+
+
+
+[endsect]
+
+[endsect]
\ No newline at end of file

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/user_guide.qbk
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/user_guide.qbk (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/doc/src/user_guide.qbk 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -9,9 +9,9 @@
 
 This section of the documentation is probably best read before the [link __tutorial__ tutorial]. In a nutshell, this is a quick and dirty run-through of how to get and install the library [-and configure your server].
 
-[include:building user_guide/building.qbk]
+[/include:building user_guide/building.qbk]
 
-[include:server_config user_guide/server_configuration.qbk]
+[/include:server_config user_guide/server_configuration.qbk]
 
 [endsect]
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/cookie_game/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/cookie_game/main.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/cookie_game/main.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -202,8 +202,7 @@
 
 int main()
 {
- service srv;
- request req(srv);
+ request req;
 
   // Load up the request data
   req.load(parse_all);

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/cookie_game2/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/cookie_game2/main.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/cookie_game2/main.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -59,13 +59,10 @@
 typedef response response_type;
 
 // These are some of the functions / types / enums used in this example.
-using boost::acgi::has_key;
 using boost::acgi::cookie;
 using boost::acgi::header;
 using boost::acgi::redirect;
 using boost::acgi::parse_all;
-using boost::acgi::form;
-using boost::acgi::cookies;
 using boost::acgi::content_type;
 
 // This function just makes it easier to change the templating engine. It's
@@ -73,8 +70,12 @@
 stencil_type* get_stencil(std::string const& filename)
 {
   if (!fs::exists(filename))
- throw std::runtime_error(std::string("Template file not found: '") + fs::path(filename).string() + "'");
- return ctemplate::Template::GetTemplate(filename, ctemplate::STRIP_WHITESPACE);
+ throw std::runtime_error(
+ std::string("Template file not found: '")
+ + fs::path(filename).string() + "'");
+ else
+ return ctemplate::Template::GetTemplate(
+ filename, ctemplate::STRIP_WHITESPACE);
 }
 
 // Show the data in the passed map, updating the passed dictionary.
@@ -98,8 +99,7 @@
 int main()
 {
   try {
- service_type srv;
- request_type req(srv);
+ request_type req;
 
     // Load up the request data
     req.load(parse_all);
@@ -107,7 +107,7 @@
     response_type resp;
 
     // Check if we are resetting the user.
- if (has_key(req.form, "reset") && req.form["reset"] == "true")
+ if (req.form.count("reset") && req.form["reset"] == "true")
     {
       resp<< cookie("name") // delete the 'name' cookie.
           << redirect(req, req.script_name()); // redirect them.
@@ -115,23 +115,24 @@
       return 0;
     }
 
- if (has_key(req.form, "name"))
+ if (req.form.count("name"))
     {
       // If requested by the user, delete the cookie.
- if (has_key(req.form, "del"))
+ if (req.form.count("del"))
         resp<< cookie(req.form["name"]);
       else // Set the cookie.
         resp<< cookie(req.form["name"], req.form["value"]);
       resp<< redirect(req, req.script_name());
       // Exit here.
- return_(resp, req, http::ok);
+ return commit(req, resp, http::ok);
     }
 
     dictionary_type dict("cookie-game dict");
 
     // First, see if they have a cookie set
- if (has_key(req.cookies, "name"))
- dict.SetValueAndShowSection("USER_NAME", req.cookies["name"], "HAS_NAME_IN_COOKIE_true");
+ if (req.cookies.count("name"))
+ dict.SetValueAndShowSection("USER_NAME", req.cookies["name"],
+ "HAS_NAME_IN_COOKIE_true");
     else
       dict.ShowSection("HAS_NAME_IN_COOKIE_false");
 
@@ -141,7 +142,7 @@
     // get_value is defined in boost/cgi/util/
     // Looks up the key in the map, returns a default value if the key
     // isn't found.
- dict.SetValue("COOKIE_NAME", get_value(req.form, "name", ""));
+ dict.SetValue("COOKIE_NAME", req.form.get("name", ""));
     dict.SetValue("COOKIE_VALUE", req.form["value"]);
 
     // Load the HTML stencil now from the index.html file.
@@ -156,7 +157,7 @@
         << output;
 
     // Send the response to the requestor and return control.
- return_(resp, req, http::ok);
+ return commit(req, resp, http::ok);
 
   }catch(boost::system::system_error& err){
     std::cerr<< "System Error: [" << err.code() << "] - " << err.what() << std::endl;

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/echo/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/echo/main.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/echo/main.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -89,8 +89,7 @@
     // throw std::runtime_error("Couldn't open file for writing");
     //std::cerr.rdbuf() = of.rdbuf();
 
- service s;
- request req(s);
+ request req;
 
     try {
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/hello_world/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/hello_world/main.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/acgi/hello_world/main.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -19,9 +19,8 @@
 
 int main()
 {
- service s; // This becomes useful with async operations.
- request req(s); // Our request (POST data won't be parsed yet).
- response resp; // A response object to make our lives easier.
+ request req; // Our request (POST data won't be parsed yet).
+ response resp; // A response object to make our lives easier.
 
   // This is a minimal response. The content_type(...) may go before or after
   // the response text.
@@ -29,7 +28,7 @@
       << "Hello there, universe.";
 
   // Leave this function, after sending the response and closing the request.
- return_(resp, req, 0); // Note the underscore: returns "0" to the OS.
+ return commit(req, resp);
 }
 //]
 

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/cgi/DebugServer2/TracebackServer.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/cgi/DebugServer2/TracebackServer.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/cgi/DebugServer2/TracebackServer.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -62,9 +62,9 @@
     template_ = ctemplate::Template::GetTemplate(TBS_TEMPLATE__DEBUG_VIEW, ctemplate::STRIP_WHITESPACE);
     dictionary_type dict("debug_view");
     dict.SetValue("ERROR", error);
- expand_map(dict, request[boost::cgi::env], "Environment Data");
- expand_map(dict, request[boost::cgi::form], "Form (" + request.request_method() + ") data");
- expand_map(dict, request[boost::cgi::cookies], "Cookies");
+ expand_map(dict, request.env, "Environment Data");
+ expand_map(dict, request.form, "Form (" + request.method() + ") data");
+ expand_map(dict, request.cookies, "Cookies");
     BOOST_FOREACH(std::string& hstring, response.headers())
     {
         dict.SetValueAndShowSection("HEADER", hstring, "RESPONSE_HEADER");
@@ -120,14 +120,12 @@
     try {
         request.load(boost::cgi::parse_all);
         int ret(callback(request, response));
- if (request[boost::cgi::form_data]["debug"] == "1") {
+ if (request.form["debug"] == "1") {
             bomb_out("** Debug mode ** - client callback returned code #" + boost::lexical_cast<std::string>(ret)
                     , response, request);
         }else
         if (!ret) {
- response.send(request.client());
- request.close();
- return true;
+ return boost::cgi::commit(request, response);
         } else {
             bomb_out("Callback returned code #" + boost::lexical_cast<std::string>(ret) + "; unknown error", response, request);
         }

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -34,9 +34,9 @@
         << content_type("text/html")
         << output;
 
- if (req[form]["badger"] == "bait!")
+ if (req.form["badger"] == "bait!")
       throw std::runtime_error("AOUHFAEOUHAEOUHAEOUHOUH!!!!!!");
- else if (has_key(req[form], "spam"))
+ else if (req.form.count("spam"))
       return -1;
     return 0;
 }

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/echo/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/echo/main.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/echo/main.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -15,6 +15,8 @@
 // variables QUERY_STRING and HTTP_COOKIE respectively.
 //
 ///////////////////////////////////////////////////////////
+#include <iostream>
+///////////////////////////////////////////////////////////
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/program_options/environment_iterator.hpp>
 ///////////////////////////////////////////////////////////
@@ -188,7 +190,7 @@
     for (;;)
     {
       a.accept(req);
- cerr<< "Accepted new request.\n";
+ std::cerr<< "Accepted new request.\n";
       ret = handle_request(req);
       if (ret)
         break;
@@ -205,14 +207,14 @@
 
 }catch(boost::system::system_error const& se){
   // This is the type of error thrown by the library.
- cerr<< "[fcgi] System error: " << se.what() << endl;
+ std::cerr<< "[fcgi] System error: " << se.what() << std::endl;
   return -1;
 }catch(std::exception const& e){
   // Catch any other exceptions
- cerr<< "[fcgi] Exception: " << e.what() << endl;
+ std::cerr<< "[fcgi] Exception: " << e.what() << std::endl;
   return -2;
 }catch(...){
- cerr<< "[fcgi] Uncaught exception!" << endl;
+ std::cerr<< "[fcgi] Uncaught exception!" << std::endl;
   return -3;
 }
 }

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/file_browser/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/file_browser/main.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/file_browser/main.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -181,8 +181,18 @@
           std::string ctype (content_type(mime_type));
           std::string clen (content_length<char>(size));
           clen += "\r\n";
- write(client, boost::asio::buffer(ctype));
- write(client, boost::asio::buffer(clen));
+
+ // Create an output buffer. This will only hold references
+ // to the data so we need to ensure the data stays in memory
+ // until the write completes.
+ //
+ // The purpose of this buffer is so efficient I/O operations
+ // (eg. scatter-gather) can be used under the hood. This vector
+ // is light-weight so it can be copied cheaply.
+ std::vector<boost::asio::const_buffer> output(3);
+ output.push_back(boost::asio::buffer(ctype));
+ output.push_back(boost::asio::buffer(clen));
+
           // Read then write up to 1MB at a time.
           boost::uintmax_t bufsize = 1000000;
           boost::uintmax_t read_bytes;
@@ -193,10 +203,14 @@
             ifs.read(buf, size < bufsize ? size : bufsize);
             read_bytes = ifs.gcount();
             size -= read_bytes;
- //cerr<< "Read " << read_bytes << " bytes from the file.\n";
+
+ output.push_back(boost::asio::buffer(buf, read_bytes));
             // Write unbuffered (ie. not using a response).
- write(client, boost::asio::buffer(buf, read_bytes)
+ write(client, output
                  , boost::asio::transfer_all(), ec);
+ // This needs to go at the end, so the Content-type, etc.
+ // headers are sent the first time around.
+ output.clear();
           }
         }
         else

Modified: sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/hello_world/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/hello_world/main.cpp (original)
+++ sandbox/SOC/2007/cgi/branches/pickmeup/libs/cgi/example/fcgi/hello_world/main.cpp 2009-11-12 09:36:13 EST (Thu, 12 Nov 2009)
@@ -12,6 +12,7 @@
 // The simplest FastCGI program, outputs only "Hello there, universe."
 //
 
+#include <boost/cgi/config.hpp>
 #include <cmath>
 #include <iostream>
 #include <boost/asio.hpp>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk