HTTP server connection. More...
#include <http_server_connection.h>
Inheritance diagram for clan::HTTPServerConnection:Public Member Functions | |
Construction | |
| HTTPServerConnection () | |
| Construct a null instance. More... | |
| HTTPServerConnection (const std::shared_ptr< HTTPServerConnection_Impl > &impl) | |
| Constructs a HTTPServerConnection. More... | |
| ~HTTPServerConnection () | |
Attributes | |
| bool | is_null () const |
| Returns true if this object is invalid. More... | |
| void | throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
| std::string | get_request_type () |
| Get Request type. More... | |
| std::string | get_request_url () |
| Get Request url. More... | |
| std::string | get_request_headers () |
| Get Request headers. More... | |
Operations | |
| DataBuffer | read_request_data () |
| Read request data. More... | |
| void | write_response_status (int status_code, const std::string &status_text=std::string()) |
| Write response status. More... | |
| void | write_response_headers (const std::string &headers) |
| Write response headers. More... | |
| void | write_response_data (const DataBuffer &data) |
| Write response data. More... | |
Public Member Functions inherited from clan::IODevice | |
| IODevice () | |
| Constructs a null instance. More... | |
| IODevice (IODeviceProvider *provider) | |
| Constructs a IODevice. More... | |
| ~IODevice () | |
| bool | is_null () const |
| Returns true if this object is invalid. More... | |
| void | throw_if_null () const |
| Throw an exception if this object is invalid. More... | |
| int | get_size () const |
| Returns the size of data stream. More... | |
| int | get_position () const |
| Returns the position in the data stream. More... | |
| bool | is_little_endian () const |
| Returns true if the input source is in little endian mode. More... | |
| const IODeviceProvider * | get_provider () const |
| Returns the provider for this object. More... | |
| IODeviceProvider * | get_provider () |
| Returns the provider for this object. More... | |
| int | send (const void *data, int len, bool send_all=true) |
| Send data to device. More... | |
| int | receive (void *data, int len, bool receive_all=true) |
| Receive data from device. More... | |
| int | peek (void *data, int len) |
| Peek data from device (data is left in the buffer). More... | |
| bool | seek (int position, SeekMode mode=seek_set) |
| Seek in data stream. More... | |
| int | read (void *data, int len, bool receive_all=true) |
| Alias for receive(data, len, receive_all) More... | |
| int | write (const void *data, int len, bool send_all=true) |
| Alias for send(data, len, send_all) More... | |
| void | set_system_mode () |
| Changes input data endianess to the local systems mode. More... | |
| void | set_big_endian_mode () |
| Changes input data endianess to big endian mode. (Default is little endian) More... | |
| void | set_little_endian_mode () |
| Changes input data endianess to little endian mode. This is the default setting. More... | |
| void | write_int64 (byte64 data) |
| Writes a signed 64 bit integer to output source. More... | |
| void | write_uint64 (ubyte64 data) |
| Writes an unsigned 64 bit integer to output source. More... | |
| void | write_int32 (byte32 data) |
| Writes a signed 32 bit integer to output source. More... | |
| void | write_uint32 (ubyte32 data) |
| Writes an unsigned 32 bit integer to output source. More... | |
| void | write_int16 (byte16 data) |
| Writes a signed 16 bit integer to output source. More... | |
| void | write_uint16 (ubyte16 data) |
| Writes an unsigned 16 bit integer to output source. More... | |
| void | write_int8 (byte8 data) |
| Writes a signed 8 bit integer to output source. More... | |
| void | write_uint8 (ubyte8 data) |
| Writes an unsigned 8 bit integer to output source. More... | |
| void | write_float (float data) |
| Writes a float to output source. More... | |
| void | write_string_a (const std::string &str) |
| Writes a string to the output source. More... | |
| void | write_string_nul (const std::string &str) |
| Writes a nul terminated string to the output source. More... | |
| void | write_string_text (const std::string &str) |
| Writes a text string to the output source. More... | |
| byte64 | read_int64 () |
| Reads a signed 64 bit integer from input source. More... | |
| ubyte64 | read_uint64 () |
| Reads an unsigned 64 bit integer from input source. More... | |
| byte32 | read_int32 () |
| Reads a signed 32 bit integer from input source. More... | |
| ubyte32 | read_uint32 () |
| Reads an unsigned 32 bit integer from input source. More... | |
| byte16 | read_int16 () |
| Reads a signed 16 bit integer from input source. More... | |
| ubyte16 | read_uint16 () |
| Reads an unsigned 16 bit integer from input source. More... | |
| byte8 | read_int8 () |
| Reads a signed 8 bit integer from input source. More... | |
| ubyte8 | read_uint8 () |
| Reads an unsigned 8 bit integer from input source. More... | |
| float | read_float () |
| Reads a float from input source. More... | |
| std::string | read_string_a () |
| Reads a string from the input source. More... | |
| std::string | read_string_nul () |
| Reads a nul terminated string from the input source. More... | |
| std::string | read_string_text (const char *skip_initial_chars, const char *read_until_chars, bool allow_eof=true) |
| Reads a string from the input source where the source is a text file. More... | |
| IODevice | duplicate () |
| Create a new IODevice referencing the same resource. More... | |
Additional Inherited Members | |
Public Types inherited from clan::IODevice | |
| enum | SeekMode { seek_set, seek_cur, seek_end } |
| Seeking modes. More... | |
Protected Attributes inherited from clan::IODevice | |
| std::shared_ptr< IODevice_Impl > | impl |
HTTP server connection.