Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions boost/cgi/basic_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

BOOST_CGI_NAMESPACE_BEGIN
namespace common {

enum client_status
{
none_, // **FIXME** !
Expand Down Expand Up @@ -82,12 +82,12 @@ BOOST_CGI_NAMESPACE_BEGIN
*/
template<typename RequestImpl>
boost::system::error_code
construct(RequestImpl& req, boost::system::error_code& ec)
construct(RequestImpl& req __attribute__((__unused__)), boost::system::error_code& ec)
{
status_ = constructed;
return ec;
}

boost::system::error_code
close(boost::uint64_t app_status, boost::system::error_code& ec)
{
Expand Down Expand Up @@ -118,7 +118,7 @@ BOOST_CGI_NAMESPACE_BEGIN
return true;
}

//io_service& io_service() { return io_service_; }
//io_context& io_context() { return io_context_; }

/// Associate a connection with this client
/**
Expand Down Expand Up @@ -182,7 +182,7 @@ BOOST_CGI_NAMESPACE_BEGIN
/// Get a shared_ptr of the connection associated with the client.
connection_ptr& connection() { return connection_; }
std::size_t& bytes_left() { return bytes_left_; }

bool is_open()
{
return connection_->is_open();
Expand All @@ -204,32 +204,32 @@ BOOST_CGI_NAMESPACE_BEGIN
{
return keep_connection_;
}

boost::uint16_t const& request_id() const
{
return request_id_;
}

private:

template<typename ConstBufferSequence>
void prepare_buffer(const ConstBufferSequence& buf)
{ /* NOOP */ }

void handle_write(
std::size_t bytes_transferred, boost::system::error_code& ec)
{ /* NOOP */ }
//io_service& io_service_;

//io_context& io_context_;
connection_ptr connection_;

public: // **FIXME**
// we should never read more than content-length bytes.
std::size_t bytes_left_;

boost::uint16_t request_id_;
client_status status_;

boost::uint64_t total_sent_bytes_;
boost::uint64_t total_sent_packets_;

Expand Down
8 changes: 4 additions & 4 deletions boost/cgi/basic_request.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ BOOST_CGI_NAMESPACE_BEGIN
basic_request(protocol_service_type& s
, const parse_options opts = traits::parse_opts
, char** base_env = NULL)
: detail::basic_io_object<service_type>(s.get_io_service())
: detail::basic_io_object<service_type>(s.get_io_context())
{
set_protocol_service(s);
if (opts > parse_none) load(opts, base_env);
Expand All @@ -137,7 +137,7 @@ BOOST_CGI_NAMESPACE_BEGIN
, boost::system::error_code& ec
, const parse_options opts = traits::parse_opts
, char** base_env = NULL)
: detail::basic_io_object<service_type>(s.get_io_service())
: detail::basic_io_object<service_type>(s.get_io_context())
{
set_protocol_service(s);
if (opts > parse_none) load(opts, ec, base_env);
Expand All @@ -146,7 +146,7 @@ BOOST_CGI_NAMESPACE_BEGIN
/// Make a new mutiplexed request from an existing connection.
// Throws.
basic_request(implementation_type& impl)
: detail::basic_io_object<service_type>(impl.service_->get_io_service())
: detail::basic_io_object<service_type>(impl.service_->get_io_context())
{
set_protocol_service(*impl.service_);
boost::system::error_code ec;
Expand All @@ -158,7 +158,7 @@ BOOST_CGI_NAMESPACE_BEGIN
/// Make a new mutiplexed request from an existing connection.
// Won't throw.
basic_request(implementation_type& impl, boost::system::error_code& ec)
: detail::basic_io_object<service_type>(impl.service_->get_io_service())
: detail::basic_io_object<service_type>(impl.service_->get_io_context())
{
set_protocol_service(*impl.service_);
this->service.begin_request_helper(this->implementation
Expand Down
Loading