| 
    PionNetworkLibrary
    
   | 
 
#include <request_writer.hpp>


Public Member Functions | |
| virtual | ~request_writer () | 
| default destructor  More... | |
| http::request & | get_request (void) | 
| returns a non-const reference to the request that will be sent  More... | |
  Public Member Functions inherited from pion::http::writer | |
| virtual | ~writer () | 
| default destructor  More... | |
| void | clear (void) | 
| clears out all of the memory buffers used to cache payload content data  More... | |
| template<typename T > | |
| void | write (const T &data) | 
| void | write (std::ostream &(*iomanip)(std::ostream &)) | 
| void | write (const void *data, size_t length) | 
| void | write_no_copy (const std::string &data) | 
| void | write_no_copy (void *data, size_t length) | 
| void | send (void) | 
| template<typename SendHandler > | |
| void | send (SendHandler send_handler) | 
| template<typename SendHandler > | |
| void | send_chunk (SendHandler send_handler) | 
| template<typename SendHandler > | |
| void | send_final_chunk (SendHandler send_handler) | 
| void | send_final_chunk (void) | 
| tcp::connection_ptr & | get_connection (void) | 
| returns a shared pointer to the TCP connection  More... | |
| size_t | get_content_length (void) const | 
| returns the length of the payload content (in bytes)  More... | |
| void | supports_chunked_messages (bool b) | 
| sets whether or not the client supports chunked messages  More... | |
| bool | supports_chunked_messages () const | 
| returns true if the client supports chunked messages  More... | |
| bool | sending_chunked_message () const | 
| returns true if we are sending a chunked message to the client  More... | |
| void | set_logger (logger log_ptr) | 
| sets the logger to be used  More... | |
| logger | get_logger (void) | 
| returns the logger currently in use  More... | |
Static Public Member Functions | |
| static boost::shared_ptr < request_writer >  | create (const tcp::connection_ptr &tcp_conn, finished_handler_t handler=finished_handler_t()) | 
| static boost::shared_ptr < request_writer >  | create (const tcp::connection_ptr &tcp_conn, const http::request_ptr &http_request_ptr, finished_handler_t handler=finished_handler_t()) | 
Protected Member Functions | |
| request_writer (const tcp::connection_ptr &tcp_conn, finished_handler_t handler) | |
| request_writer (const tcp::connection_ptr &tcp_conn, const http::request_ptr &http_request_ptr, finished_handler_t handler) | |
| virtual void | prepare_buffers_for_send (http::message::write_buffers_t &write_buffers) | 
| virtual write_handler_t | bind_to_write_handler (void) | 
| returns a function bound to http::writer::handle_write()  More... | |
| virtual void | handle_write (const boost::system::error_code &write_error, std::size_t bytes_written) | 
  Protected Member Functions inherited from pion::http::writer | |
| writer (const tcp::connection_ptr &tcp_conn, finished_handler_t handler) | |
| void | finished_writing (const boost::system::error_code &ec) | 
| called after we have finished sending the HTTP message  More... | |
Additional Inherited Members | |
  Protected Types inherited from pion::http::writer | |
| typedef boost::function1< void,  const boost::system::error_code & >  | finished_handler_t | 
| function called after the HTTP message has been sent  More... | |
| typedef boost::function2< void,  const boost::system::error_code &, std::size_t >  | write_handler_t | 
| data type for a function that handles write operations  More... | |
request_writer: used to asynchronously send HTTP requests
      
  | 
  inlinevirtual | 
default destructor
      
  | 
  inlineprotected | 
protected constructor restricts creation of objects (use create())
| tcp_conn | TCP connection used to send the request | 
| handler | function called after the request has been sent | 
References PION_GET_LOGGER, and pion::http::writer::set_logger().
Referenced by create().
      
  | 
  inlineprotected | 
protected constructor restricts creation of objects (use create())
| tcp_conn | TCP connection used to send the request | 
| http_request_ptr | pointer to the request that will be sent | 
| handler | function called after the request has been sent | 
References PION_GET_LOGGER, pion::http::writer::set_logger(), and pion::http::writer::write_no_copy().
      
  | 
  inlineprotectedvirtual | 
returns a function bound to http::writer::handle_write()
Implements pion::http::writer.
References handle_write().
      
  | 
  inlinestatic | 
creates new request_writer objects
| tcp_conn | TCP connection used to send the request | 
| handler | function called after the request has been sent | 
References request_writer().
      
  | 
  inlinestatic | 
creates new request_writer objects
| tcp_conn | TCP connection used to send the request | 
| http_request_ptr | pointer to the request that will be sent | 
| handler | function called after the request has been sent | 
References request_writer().
      
  | 
  inline | 
returns a non-const reference to the request that will be sent
      
  | 
  inlineprotectedvirtual | 
called after the request is sent
| write_error | error status from the last write operation | 
| bytes_written | number of bytes sent by the last write operation | 
Implements pion::http::writer.
References pion::http::writer::clear(), pion::http::writer::finished_writing(), pion::http::writer::get_logger(), PION_LOG_DEBUG, and pion::http::writer::sending_chunked_message().
Referenced by bind_to_write_handler().
      
  | 
  inlineprotectedvirtual | 
initializes a vector of write buffers with the HTTP message information
| write_buffers | vector of write buffers to initialize | 
Implements pion::http::writer.
References pion::http::writer::get_connection(), pion::http::writer::get_content_length(), and pion::http::writer::sending_chunked_message().