RDFS
The Rice Comp413 2017 class' continuation on the work of the 2016 RDFS.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Public Attributes | Friends | List of all members
SimpleWeb::ServerBase< socket_type >::Response Class Reference
Inheritance diagram for SimpleWeb::ServerBase< socket_type >::Response:

Public Member Functions

std::size_t size () noexcept
 
void send (const std::function< void(const error_code &)> &callback=nullptr) noexcept
 Use this function if you need to recursively send parts of a longer message.
 
void write (const char_type *ptr, std::streamsize n)
 Write directly to stream buffer using std::ostream::write.
 
void write (StatusCode status_code=StatusCode::success_ok, const CaseInsensitiveMultimap &header=CaseInsensitiveMultimap())
 Convenience function for writing status line, potential header fields, and empty content.
 
void write (StatusCode status_code, const std::string &content, const CaseInsensitiveMultimap &header=CaseInsensitiveMultimap())
 Convenience function for writing status line, header fields, and content.
 
void write (StatusCode status_code, std::istream &content, const CaseInsensitiveMultimap &header=CaseInsensitiveMultimap())
 Convenience function for writing status line, header fields, and content.
 
void write (const std::string &content, const CaseInsensitiveMultimap &header=CaseInsensitiveMultimap())
 Convenience function for writing success status line, header fields, and content.
 
void write (std::istream &content, const CaseInsensitiveMultimap &header=CaseInsensitiveMultimap())
 Convenience function for writing success status line, header fields, and content.
 
void write (const CaseInsensitiveMultimap &header)
 Convenience function for writing success status line, and header fields.
 

Public Attributes

bool close_connection_after_response = false
 

Friends

class ServerBase< socket_type >
 
class Server< socket_type >
 

Member Data Documentation

template<class socket_type>
bool SimpleWeb::ServerBase< socket_type >::Response::close_connection_after_response = false

If true, force server to close the connection after the response have been sent.

This is useful when implementing a HTTP/1.0-server sending content without specifying the content length.


The documentation for this class was generated from the following file: