#include <http_base.h>
|
static const std::string | NO_VAL |
|
Definition at line 30 of file http_base.h.
tasks::net::http_base::http_base |
( |
| ) |
|
|
inline |
virtual tasks::net::http_base::~http_base |
( |
| ) |
|
|
inlinevirtual |
virtual void tasks::net::http_base::clear |
( |
| ) |
|
|
inlinevirtual |
std::istream& tasks::net::http_base::content_istream |
( |
| ) |
|
|
inline |
- Returns
- An std::istream to access the content buffer.
Definition at line 97 of file http_base.h.
std::size_t tasks::net::http_base::content_length |
( |
| ) |
const |
|
inline |
- Returns
- The content length.
Definition at line 64 of file http_base.h.
std::ostream& tasks::net::http_base::content_ostream |
( |
| ) |
|
|
inline |
- Returns
- An std::ostream to access the content buffer.
Definition at line 100 of file http_base.h.
const char* tasks::net::http_base::content_p |
( |
| ) |
const |
|
inline |
- Returns
- A pointer to the content buffer if it contains data or nullptr if it is empty.
Definition at line 67 of file http_base.h.
bool tasks::net::http_base::done |
( |
| ) |
const |
|
inline |
- Returns
- True after an HTTP object has been read from a socket and parsed or written to a socket.
Definition at line 116 of file http_base.h.
const std::string& tasks::net::http_base::header |
( |
std::string |
name | ) |
const |
|
inline |
- Parameters
-
- Returns
- The header value.
Definition at line 55 of file http_base.h.
virtual void tasks::net::http_base::prepare_data_buffer |
( |
| ) |
|
|
pure virtual |
void tasks::net::http_base::print |
( |
| ) |
const |
|
inline |
std::size_t tasks::net::http_base::read |
( |
char * |
data, |
|
|
std::size_t |
size |
|
) |
| |
|
inline |
Copy data from the content buffer into a destination buffer.
- Parameters
-
data | A pointer to the destination. |
size | The number of bytes to copy. |
Definition at line 94 of file http_base.h.
void tasks::net::http_base::set_header |
( |
std::string |
header, |
|
|
std::string |
value |
|
) |
| |
|
inline |
Set an HTTP header.
- Parameters
-
header | The header name. |
value | The header value. |
Definition at line 46 of file http_base.h.
void tasks::net::http_base::set_state |
( |
io_state |
state | ) |
|
|
inline |
io_state tasks::net::http_base::state |
( |
| ) |
const |
|
inline |
std::size_t tasks::net::http_base::write |
( |
std::string |
s | ) |
|
|
inline |
Write a string to the content buffer.
- Parameters
-
Definition at line 77 of file http_base.h.
std::size_t tasks::net::http_base::write |
( |
const std::string & |
s | ) |
|
|
inline |
Write a string to the content buffer.
- Parameters
-
Definition at line 82 of file http_base.h.
std::size_t tasks::net::http_base::write |
( |
const char * |
data, |
|
|
std::size_t |
size |
|
) |
| |
|
inline |
Write data to the content buffer.
- Parameters
-
data | A pointer to the source data. |
size | The number of bytes to copy. |
Definition at line 88 of file http_base.h.
void tasks::net::http_base::write_content |
( |
socket & |
sock | ) |
|
|
protected |
void tasks::net::http_base::write_data |
( |
socket & |
sock | ) |
|
Write a HTTP object to a socket.
Definition at line 19 of file http_base.cpp.
void tasks::net::http_base::write_headers |
( |
socket & |
sock | ) |
|
|
protected |
std::istream tasks::net::http_base::m_content_istream |
|
protected |
std::size_t tasks::net::http_base::m_content_length = 0 |
|
protected |
std::ostream tasks::net::http_base::m_content_ostream |
|
protected |
std::unordered_map<std::string, std::string> tasks::net::http_base::m_headers |
|
protected |
const std::string tasks::net::http_base::NO_VAL |
|
static |
The documentation for this class was generated from the following files: