1#ifndef COMPA_NET_HTTP_WEBSERVER_HPP
2#define COMPA_NET_HTTP_WEBSERVER_HPP
77#if !defined(X_USER_AGENT) || defined(DOXYGEN_RUN)
87#define X_USER_AGENT "redsonic"
110 const char* a_alias_name,
115 const char* a_alias_content,
118 size_t a_alias_content_length,
120 time_t a_last_modified);
134 const char* root_dir);
144 const char* cors_string);
Structure of an HTTP parser object.
Structure of an HTTP message.
membuffer gDocumentRootDir
off_t RangeOffset
member variable
void web_server_callback(http_parser_t *a_parser, http_message_t *a_req, SOCKINFO *a_info)
Main entry point into web server.
long RecvWriteSize
Recv from the network and write into local file.
int web_server_set_root_dir(const char *root_dir)
Assign the path to the global Document root directory.
off_t ReadSendSize
Read from local source and send on the network.
const void * RequestCookie
Cookie associated with the request.
void SetHTTPGetCallback(MiniServerCallback callback)
Set HTTP Get Callback.
int web_server_set_cors(const char *cors_string)
Assign the Access-Control-Allow-Origin specfied by the input const char* cors_string parameterto the ...
int IsRangeActive
member variable
int web_server_set_alias(const char *a_alias_name, const char *a_alias_content, size_t a_alias_content_length, time_t a_last_modified)
Replaces current alias with the given alias.
void web_server_destroy()
Release memory allocated for the global web server root directory and the global XML document.
const void * Cookie
Cookie associated with the virtualDir.
char AcceptLanguageHeader[200]
member variable
int IsTrailers
member variable
void web_server_init()
Initilialize root directory for web server and different documents.
membuffer gWebserverCorsString
int IsVirtualFile
member variable
char RangeHeader[200]
member variable
int IsChunkActive
member variable
Maintains a block of dynamically allocated memory.
Manage "Step 0: Addressing" of the UPnP+™ specification.
void(* MiniServerCallback)(http_parser_t *parser, http_message_t *request, SOCKINFO *info)
For a miniserver callback function.
Manage network sockets and connections.
Additional socket information for connections and ssl.