Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
civetweb.h File Reference
#include <stddef.h>
#include <stdio.h>
Include dependency graph for civetweb.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  mg_callbacks
 
struct  mg_client_cert
 
struct  mg_client_options
 
struct  mg_error_data
 
struct  mg_form_data_handler
 
struct  mg_header
 
struct  mg_init_data
 
struct  mg_option
 
struct  mg_request_info
 
struct  mg_response_info
 
struct  mg_server_port
 
struct  mg_websocket_subprotocols
 

Macros

#define CIVETWEB_API
 
#define CIVETWEB_VERSION   "1.15"
 
#define CIVETWEB_VERSION_MAJOR   (1)
 
#define CIVETWEB_VERSION_MINOR   (15)
 
#define CIVETWEB_VERSION_PATCH   (0)
 
#define MG_MAX_HEADERS   (64)
 
#define mg_server_ports   mg_server_port
 
#define PRINTF_ARGS(x, y)
 
#define PRINTF_FORMAT_STRING(s)   s
 

Typedefs

typedef int(* mg_authorization_handler) (struct mg_connection *conn, void *cbdata)
 
typedef int(* mg_request_handler) (struct mg_connection *conn, void *cbdata)
 
typedef void *(* mg_thread_func_t) (void *)
 
typedef void(* mg_websocket_close_handler) (const struct mg_connection *, void *)
 
typedef int(* mg_websocket_connect_handler) (const struct mg_connection *, void *)
 
typedef int(* mg_websocket_data_handler) (struct mg_connection *, int, char *, size_t, void *)
 
typedef void(* mg_websocket_ready_handler) (struct mg_connection *, void *)
 

Enumerations

enum  {
  MG_FEATURES_DEFAULT = 0x0u , MG_FEATURES_FILES = 0x1u , MG_FEATURES_TLS = 0x2u , MG_FEATURES_SSL = 0x2u ,
  MG_FEATURES_CGI = 0x4u , MG_FEATURES_IPV6 = 0x8u , MG_FEATURES_WEBSOCKET = 0x10u , MG_FEATURES_LUA = 0x20u ,
  MG_FEATURES_SSJS = 0x40u , MG_FEATURES_CACHE = 0x80u , MG_FEATURES_STATS = 0x100u , MG_FEATURES_COMPRESSION = 0x200u ,
  MG_FEATURES_HTTP2 = 0x400u , MG_FEATURES_X_DOMAIN_SOCKET = 0x800u , MG_FEATURES_ALL = 0xFFFFu
}
 
enum  {
  MG_CONFIG_TYPE_UNKNOWN = 0x0 , MG_CONFIG_TYPE_NUMBER = 0x1 , MG_CONFIG_TYPE_STRING = 0x2 , MG_CONFIG_TYPE_FILE = 0x3 ,
  MG_CONFIG_TYPE_DIRECTORY = 0x4 , MG_CONFIG_TYPE_BOOLEAN = 0x5 , MG_CONFIG_TYPE_EXT_PATTERN = 0x6 , MG_CONFIG_TYPE_STRING_LIST = 0x7 ,
  MG_CONFIG_TYPE_STRING_MULTILINE = 0x8 , MG_CONFIG_TYPE_YES_NO_OPTIONAL = 0x9
}
 
enum  {
  MG_WEBSOCKET_OPCODE_CONTINUATION = 0x0 , MG_WEBSOCKET_OPCODE_TEXT = 0x1 , MG_WEBSOCKET_OPCODE_BINARY = 0x2 , MG_WEBSOCKET_OPCODE_CONNECTION_CLOSE = 0x8 ,
  MG_WEBSOCKET_OPCODE_PING = 0x9 , MG_WEBSOCKET_OPCODE_PONG = 0xa
}
 
enum  { MG_FORM_FIELD_STORAGE_SKIP = 0x0 , MG_FORM_FIELD_STORAGE_GET = 0x1 , MG_FORM_FIELD_STORAGE_STORE = 0x2 , MG_FORM_FIELD_STORAGE_ABORT = 0x10 }
 
enum  { MG_FORM_FIELD_HANDLE_GET = 0x1 , MG_FORM_FIELD_HANDLE_NEXT = 0x8 , MG_FORM_FIELD_HANDLE_ABORT = 0x10 }
 
enum  { MG_TIMEOUT_INFINITE = -1 }
 

Functions

int mg_check_digest_access_authentication (struct mg_connection *conn, const char *realm, const char *filename)
 
unsigned mg_check_feature (unsigned feature)
 
void mg_close_connection (struct mg_connection *conn)
 
struct mg_connectionmg_connect_client (const char *host, int port, int use_ssl, char *error_buffer, size_t error_buffer_size)
 
struct mg_connectionmg_connect_client_secure (const struct mg_client_options *client_options, char *error_buffer, size_t error_buffer_size)
 
struct mg_connectionmg_connect_websocket_client (const char *host, int port, int use_ssl, char *error_buffer, size_t error_buffer_size, const char *path, const char *origin, mg_websocket_data_handler data_func, mg_websocket_close_handler close_func, void *user_data)
 
struct mg_connectionmg_connect_websocket_client_extensions (const char *host, int port, int use_ssl, char *error_buffer, size_t error_buffer_size, const char *path, const char *origin, const char *extensions, mg_websocket_data_handler data_func, mg_websocket_close_handler close_func, void *user_data)
 
struct mg_connectionmg_connect_websocket_client_secure (const struct mg_client_options *client_options, char *error_buffer, size_t error_buffer_size, const char *path, const char *origin, mg_websocket_data_handler data_func, mg_websocket_close_handler close_func, void *user_data)
 
struct mg_connectionmg_connect_websocket_client_secure_extensions (const struct mg_client_options *client_options, char *error_buffer, size_t error_buffer_size, const char *path, const char *origin, const char *extensions, mg_websocket_data_handler data_func, mg_websocket_close_handler close_func, void *user_data)
 
void mg_cry (const struct mg_connection *conn, const char *fmt,...)
 
void mg_disable_connection_keep_alive (struct mg_connection *conn)
 
struct mg_connectionmg_download (const char *host, int port, int use_ssl, char *error_buffer, size_t error_buffer_size, const char *request_fmt,...)
 
unsigned mg_exit_library (void)
 
const char * mg_get_builtin_mime_type (const char *file_name)
 
struct mg_contextmg_get_context (const struct mg_connection *conn)
 
int mg_get_context_info (const struct mg_context *ctx, char *buffer, int buflen)
 
int mg_get_cookie (const char *cookie, const char *var_name, char *buf, size_t buf_len)
 
const char * mg_get_header (const struct mg_connection *, const char *name)
 
const char * mg_get_option (const struct mg_context *ctx, const char *name)
 
const struct mg_request_infomg_get_request_info (const struct mg_connection *)
 
int mg_get_request_link (const struct mg_connection *conn, char *buf, size_t buflen)
 
int mg_get_response (struct mg_connection *conn, char *ebuf, size_t ebuf_len, int timeout)
 
const char * mg_get_response_code_text (const struct mg_connection *conn, int response_code)
 
const struct mg_response_infomg_get_response_info (const struct mg_connection *)
 
int mg_get_server_ports (const struct mg_context *ctx, int size, struct mg_server_port *ports)
 
int mg_get_system_info (char *buffer, int buflen)
 
void * mg_get_thread_pointer (const struct mg_connection *conn)
 
void * mg_get_user_connection_data (const struct mg_connection *conn)
 
void * mg_get_user_context_data (const struct mg_connection *conn)
 
void * mg_get_user_data (const struct mg_context *ctx)
 
const struct mg_optionmg_get_valid_options (void)
 
int mg_get_var (const char *data, size_t data_len, const char *var_name, char *dst, size_t dst_len)
 
int mg_get_var2 (const char *data, size_t data_len, const char *var_name, char *dst, size_t dst_len, size_t occurrence)
 
int mg_handle_form_request (struct mg_connection *conn, struct mg_form_data_handler *fdh)
 
unsigned mg_init_library (unsigned features)
 
void mg_lock_connection (struct mg_connection *conn)
 
void mg_lock_context (struct mg_context *ctx)
 
char * mg_md5 (char buf[33],...)
 
int mg_modify_passwords_file (const char *passwords_file_name, const char *realm, const char *user, const char *password)
 
int mg_modify_passwords_file_ha1 (const char *passwords_file_name, const char *realm, const char *user, const char *ha1)
 
int mg_printf (struct mg_connection *, const char *fmt,...)
 
int mg_read (struct mg_connection *, void *buf, size_t len)
 
int mg_response_header_add (struct mg_connection *conn, const char *header, const char *value, int value_len)
 
int mg_response_header_add_lines (struct mg_connection *conn, const char *http1_headers)
 
int mg_response_header_send (struct mg_connection *conn)
 
int mg_response_header_start (struct mg_connection *conn, int status)
 
int mg_send_chunk (struct mg_connection *conn, const char *chunk, unsigned int chunk_len)
 
int mg_send_digest_access_authentication_request (struct mg_connection *conn, const char *realm)
 
void mg_send_file (struct mg_connection *conn, const char *path)
 
int mg_send_file_body (struct mg_connection *conn, const char *path)
 
int mg_send_http_error (struct mg_connection *conn, int status_code, const char *fmt,...)
 
int mg_send_http_ok (struct mg_connection *conn, const char *mime_type, long long content_length)
 
int mg_send_http_redirect (struct mg_connection *conn, const char *target_url, int redirect_code)
 
void mg_send_mime_file (struct mg_connection *conn, const char *path, const char *mime_type)
 
void mg_send_mime_file2 (struct mg_connection *conn, const char *path, const char *mime_type, const char *additional_headers)
 
void mg_set_auth_handler (struct mg_context *ctx, const char *uri, mg_authorization_handler handler, void *cbdata)
 
void mg_set_request_handler (struct mg_context *ctx, const char *uri, mg_request_handler handler, void *cbdata)
 
void mg_set_user_connection_data (const struct mg_connection *conn, void *data)
 
void mg_set_websocket_handler (struct mg_context *ctx, const char *uri, mg_websocket_connect_handler connect_handler, mg_websocket_ready_handler ready_handler, mg_websocket_data_handler data_handler, mg_websocket_close_handler close_handler, void *cbdata)
 
void mg_set_websocket_handler_with_subprotocols (struct mg_context *ctx, const char *uri, struct mg_websocket_subprotocols *subprotocols, mg_websocket_connect_handler connect_handler, mg_websocket_ready_handler ready_handler, mg_websocket_data_handler data_handler, mg_websocket_close_handler close_handler, void *cbdata)
 
int mg_split_form_urlencoded (char *data, struct mg_header *form_fields, unsigned num_form_fields)
 
struct mg_contextmg_start (const struct mg_callbacks *callbacks, void *user_data, const char **configuration_options)
 
struct mg_contextmg_start2 (struct mg_init_data *init, struct mg_error_data *error)
 
int mg_start_domain (struct mg_context *ctx, const char **configuration_options)
 
int mg_start_domain2 (struct mg_context *ctx, const char **configuration_options, struct mg_error_data *error)
 
int mg_start_thread (mg_thread_func_t f, void *p)
 
void mg_stop (struct mg_context *)
 
long long mg_store_body (struct mg_connection *conn, const char *path)
 
int mg_strcasecmp (const char *s1, const char *s2)
 
int mg_strncasecmp (const char *s1, const char *s2, size_t len)
 
void mg_unlock_connection (struct mg_connection *conn)
 
void mg_unlock_context (struct mg_context *ctx)
 
int mg_url_decode (const char *src, int src_len, char *dst, int dst_len, int is_form_url_encoded)
 
int mg_url_encode (const char *src, char *dst, size_t dst_len)
 
const char * mg_version (void)
 
int mg_websocket_client_write (struct mg_connection *conn, int opcode, const char *data, size_t data_len)
 
int mg_websocket_write (struct mg_connection *conn, int opcode, const char *data, size_t data_len)
 
int mg_write (struct mg_connection *, const void *buf, size_t len)
 

Macro Definition Documentation

◆ CIVETWEB_API

#define CIVETWEB_API

Definition at line 43 of file civetweb.h.

◆ CIVETWEB_VERSION

#define CIVETWEB_VERSION   "1.15"

Definition at line 26 of file civetweb.h.

◆ CIVETWEB_VERSION_MAJOR

#define CIVETWEB_VERSION_MAJOR   (1)

Definition at line 27 of file civetweb.h.

◆ CIVETWEB_VERSION_MINOR

#define CIVETWEB_VERSION_MINOR   (15)

Definition at line 28 of file civetweb.h.

◆ CIVETWEB_VERSION_PATCH

#define CIVETWEB_VERSION_PATCH   (0)

Definition at line 29 of file civetweb.h.

◆ MG_MAX_HEADERS

#define MG_MAX_HEADERS   (64)

Definition at line 141 of file civetweb.h.

◆ mg_server_ports

#define mg_server_ports   mg_server_port

Definition at line 724 of file civetweb.h.

◆ PRINTF_ARGS

#define PRINTF_ARGS (   x,
  y 
)

Definition at line 883 of file civetweb.h.

◆ PRINTF_FORMAT_STRING

#define PRINTF_FORMAT_STRING (   s)    s

Definition at line 877 of file civetweb.h.

Typedef Documentation

◆ mg_authorization_handler

typedef int(* mg_authorization_handler) (struct mg_connection *conn, void *cbdata)

Definition at line 606 of file civetweb.h.

◆ mg_request_handler

typedef int(* mg_request_handler) (struct mg_connection *conn, void *cbdata)

Definition at line 492 of file civetweb.h.

◆ mg_thread_func_t

typedef void *(* mg_thread_func_t) (void *)

Definition at line 1307 of file civetweb.h.

◆ mg_websocket_close_handler

typedef void(* mg_websocket_close_handler) (const struct mg_connection *, void *)

Definition at line 555 of file civetweb.h.

◆ mg_websocket_connect_handler

typedef int(* mg_websocket_connect_handler) (const struct mg_connection *, void *)

Definition at line 547 of file civetweb.h.

◆ mg_websocket_data_handler

typedef int(* mg_websocket_data_handler) (struct mg_connection *, int, char *, size_t, void *)

Definition at line 550 of file civetweb.h.

◆ mg_websocket_ready_handler

typedef void(* mg_websocket_ready_handler) (struct mg_connection *, void *)

Definition at line 549 of file civetweb.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MG_FEATURES_DEFAULT 
MG_FEATURES_FILES 
MG_FEATURES_TLS 
MG_FEATURES_SSL 
MG_FEATURES_CGI 
MG_FEATURES_IPV6 
MG_FEATURES_WEBSOCKET 
MG_FEATURES_LUA 
MG_FEATURES_SSJS 
MG_FEATURES_CACHE 
MG_FEATURES_STATS 
MG_FEATURES_COMPRESSION 
MG_FEATURES_HTTP2 
MG_FEATURES_X_DOMAIN_SOCKET 
MG_FEATURES_ALL 

Definition at line 56 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
MG_CONFIG_TYPE_UNKNOWN 
MG_CONFIG_TYPE_NUMBER 
MG_CONFIG_TYPE_STRING 
MG_CONFIG_TYPE_FILE 
MG_CONFIG_TYPE_DIRECTORY 
MG_CONFIG_TYPE_BOOLEAN 
MG_CONFIG_TYPE_EXT_PATTERN 
MG_CONFIG_TYPE_STRING_LIST 
MG_CONFIG_TYPE_STRING_MULTILINE 
MG_CONFIG_TYPE_YES_NO_OPTIONAL 

Definition at line 693 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
MG_WEBSOCKET_OPCODE_CONTINUATION 
MG_WEBSOCKET_OPCODE_TEXT 
MG_WEBSOCKET_OPCODE_BINARY 
MG_WEBSOCKET_OPCODE_CONNECTION_CLOSE 
MG_WEBSOCKET_OPCODE_PING 
MG_WEBSOCKET_OPCODE_PONG 

Definition at line 857 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
MG_FORM_FIELD_STORAGE_SKIP 
MG_FORM_FIELD_STORAGE_GET 
MG_FORM_FIELD_STORAGE_STORE 
MG_FORM_FIELD_STORAGE_ABORT 

Definition at line 1270 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
MG_FORM_FIELD_HANDLE_GET 
MG_FORM_FIELD_HANDLE_NEXT 
MG_FORM_FIELD_HANDLE_ABORT 

Definition at line 1283 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
MG_TIMEOUT_INFINITE 

Definition at line 1474 of file civetweb.h.

Function Documentation

◆ mg_check_digest_access_authentication()

int mg_check_digest_access_authentication ( struct mg_connection conn,
const char *  realm,
const char *  filename 
)

Definition at line 8642 of file civetweb.c.

◆ mg_check_feature()

unsigned mg_check_feature ( unsigned  feature)

Definition at line 20463 of file civetweb.c.

◆ mg_close_connection()

void mg_close_connection ( struct mg_connection conn)

Definition at line 17120 of file civetweb.c.

◆ mg_connect_client()

struct mg_connection * mg_connect_client ( const char *  host,
int  port,
int  use_ssl,
char *  error_buffer,
size_t  error_buffer_size 
)

Definition at line 17392 of file civetweb.c.

◆ mg_connect_client_secure()

struct mg_connection * mg_connect_client_secure ( const struct mg_client_options client_options,
char *  error_buffer,
size_t  error_buffer_size 
)

Definition at line 17380 of file civetweb.c.

◆ mg_connect_websocket_client()

struct mg_connection * mg_connect_websocket_client ( const char *  host,
int  port,
int  use_ssl,
char *  error_buffer,
size_t  error_buffer_size,
const char *  path,
const char *  origin,
mg_websocket_data_handler  data_func,
mg_websocket_close_handler  close_func,
void *  user_data 
)

Definition at line 18331 of file civetweb.c.

◆ mg_connect_websocket_client_extensions()

struct mg_connection * mg_connect_websocket_client_extensions ( const char *  host,
int  port,
int  use_ssl,
char *  error_buffer,
size_t  error_buffer_size,
const char *  path,
const char *  origin,
const char *  extensions,
mg_websocket_data_handler  data_func,
mg_websocket_close_handler  close_func,
void *  user_data 
)

Definition at line 18387 of file civetweb.c.

◆ mg_connect_websocket_client_secure()

struct mg_connection * mg_connect_websocket_client_secure ( const struct mg_client_options client_options,
char *  error_buffer,
size_t  error_buffer_size,
const char *  path,
const char *  origin,
mg_websocket_data_handler  data_func,
mg_websocket_close_handler  close_func,
void *  user_data 
)

Definition at line 18361 of file civetweb.c.

◆ mg_connect_websocket_client_secure_extensions()

struct mg_connection * mg_connect_websocket_client_secure_extensions ( const struct mg_client_options client_options,
char *  error_buffer,
size_t  error_buffer_size,
const char *  path,
const char *  origin,
const char *  extensions,
mg_websocket_data_handler  data_func,
mg_websocket_close_handler  close_func,
void *  user_data 
)

Definition at line 18417 of file civetweb.c.

◆ mg_cry()

void mg_cry ( const struct mg_connection conn,
const char *  fmt,
  ... 
)

Definition at line 3466 of file civetweb.c.

◆ mg_disable_connection_keep_alive()

void mg_disable_connection_keep_alive ( struct mg_connection conn)

Definition at line 21076 of file civetweb.c.

◆ mg_download()

struct mg_connection * mg_download ( const char *  host,
int  port,
int  use_ssl,
char *  error_buffer,
size_t  error_buffer_size,
const char *  request_fmt,
  ... 
)

Definition at line 17998 of file civetweb.c.

◆ mg_exit_library()

unsigned mg_exit_library ( void  )

Definition at line 21444 of file civetweb.c.

◆ mg_get_builtin_mime_type()

const char * mg_get_builtin_mime_type ( const char *  file_name)

Definition at line 8134 of file civetweb.c.

◆ mg_get_context()

struct mg_context * mg_get_context ( const struct mg_connection conn)

Definition at line 3151 of file civetweb.c.

◆ mg_get_context_info()

int mg_get_context_info ( const struct mg_context ctx,
char *  buffer,
int  buflen 
)

Definition at line 20877 of file civetweb.c.

◆ mg_get_cookie()

int mg_get_cookie ( const char *  cookie,
const char *  var_name,
char *  buf,
size_t  buf_len 
)

Definition at line 7157 of file civetweb.c.

◆ mg_get_header()

const char * mg_get_header ( const struct mg_connection conn,
const char *  name 
)

Definition at line 3800 of file civetweb.c.

◆ mg_get_option()

const char * mg_get_option ( const struct mg_context ctx,
const char *  name 
)

Definition at line 3136 of file civetweb.c.

◆ mg_get_request_info()

const struct mg_request_info * mg_get_request_info ( const struct mg_connection conn)

Definition at line 3486 of file civetweb.c.

◆ mg_get_request_link()

int mg_get_request_link ( const struct mg_connection conn,
char *  buf,
size_t  buflen 
)

Definition at line 3687 of file civetweb.c.

◆ mg_get_response()

int mg_get_response ( struct mg_connection conn,
char *  ebuf,
size_t  ebuf_len,
int  timeout 
)

Definition at line 17946 of file civetweb.c.

◆ mg_get_response_code_text()

const char * mg_get_response_code_text ( const struct mg_connection conn,
int  response_code 
)

Definition at line 4150 of file civetweb.c.

◆ mg_get_response_info()

const struct mg_response_info * mg_get_response_info ( const struct mg_connection conn)

Definition at line 3526 of file civetweb.c.

◆ mg_get_server_ports()

int mg_get_server_ports ( const struct mg_context ctx,
int  size,
struct mg_server_port ports 
)

Definition at line 3211 of file civetweb.c.

◆ mg_get_system_info()

int mg_get_system_info ( char *  buffer,
int  buflen 
)

Definition at line 20545 of file civetweb.c.

◆ mg_get_thread_pointer()

void * mg_get_thread_pointer ( const struct mg_connection conn)

Definition at line 3172 of file civetweb.c.

◆ mg_get_user_connection_data()

void * mg_get_user_connection_data ( const struct mg_connection conn)

Definition at line 3201 of file civetweb.c.

◆ mg_get_user_context_data()

void * mg_get_user_context_data ( const struct mg_connection conn)

Definition at line 3165 of file civetweb.c.

◆ mg_get_user_data()

void * mg_get_user_data ( const struct mg_context ctx)

Definition at line 3158 of file civetweb.c.

◆ mg_get_valid_options()

const struct mg_option * mg_get_valid_options ( void  )

Definition at line 2796 of file civetweb.c.

◆ mg_get_var()

int mg_get_var ( const char *  data,
size_t  data_len,
const char *  var_name,
char *  dst,
size_t  dst_len 
)

Definition at line 6989 of file civetweb.c.

◆ mg_get_var2()

int mg_get_var2 ( const char *  data,
size_t  data_len,
const char *  var_name,
char *  dst,
size_t  dst_len,
size_t  occurrence 
)

Definition at line 7000 of file civetweb.c.

◆ mg_handle_form_request()

int mg_handle_form_request ( struct mg_connection conn,
struct mg_form_data_handler fdh 
)

Definition at line 181 of file handle_form.inl.

◆ mg_init_library()

unsigned mg_init_library ( unsigned  features)

Definition at line 21340 of file civetweb.c.

◆ mg_lock_connection()

void mg_lock_connection ( struct mg_connection conn)

Definition at line 12281 of file civetweb.c.

◆ mg_lock_context()

void mg_lock_context ( struct mg_context ctx)

Definition at line 12297 of file civetweb.c.

◆ mg_md5()

char * mg_md5 ( char  buf[33],
  ... 
)

Definition at line 8206 of file civetweb.c.

◆ mg_modify_passwords_file()

int mg_modify_passwords_file ( const char *  passwords_file_name,
const char *  realm,
const char *  user,
const char *  password 
)

Definition at line 8925 of file civetweb.c.

◆ mg_modify_passwords_file_ha1()

int mg_modify_passwords_file_ha1 ( const char *  passwords_file_name,
const char *  realm,
const char *  user,
const char *  ha1 
)

Definition at line 8935 of file civetweb.c.

◆ mg_printf()

int mg_printf ( struct mg_connection conn,
const char *  fmt,
  ... 
)

Definition at line 6935 of file civetweb.c.

◆ mg_read()

int mg_read ( struct mg_connection conn,
void *  buf,
size_t  len 
)

Definition at line 6586 of file civetweb.c.

◆ mg_response_header_add()

int mg_response_header_add ( struct mg_connection conn,
const char *  header,
const char *  value,
int  value_len 
)

Definition at line 120 of file response.inl.

◆ mg_response_header_add_lines()

int mg_response_header_add_lines ( struct mg_connection conn,
const char *  http1_headers 
)

Definition at line 209 of file response.inl.

◆ mg_response_header_send()

int mg_response_header_send ( struct mg_connection conn)

Definition at line 259 of file response.inl.

◆ mg_response_header_start()

int mg_response_header_start ( struct mg_connection conn,
int  status 
)

Definition at line 73 of file response.inl.

◆ mg_send_chunk()

int mg_send_chunk ( struct mg_connection conn,
const char *  chunk,
unsigned int  chunk_len 
)

Definition at line 6775 of file civetweb.c.

◆ mg_send_digest_access_authentication_request()

int mg_send_digest_access_authentication_request ( struct mg_connection conn,
const char *  realm 
)

Definition at line 8771 of file civetweb.c.

◆ mg_send_file()

void mg_send_file ( struct mg_connection conn,
const char *  path 
)

Definition at line 10192 of file civetweb.c.

◆ mg_send_file_body()

int mg_send_file_body ( struct mg_connection conn,
const char *  path 
)

Definition at line 10133 of file civetweb.c.

◆ mg_send_http_error()

int mg_send_http_error ( struct mg_connection conn,
int  status_code,
const char *  fmt,
  ... 
)

Definition at line 4535 of file civetweb.c.

◆ mg_send_http_ok()

int mg_send_http_ok ( struct mg_connection conn,
const char *  mime_type,
long long  content_length 
)

Definition at line 4549 of file civetweb.c.

◆ mg_send_http_redirect()

int mg_send_http_redirect ( struct mg_connection conn,
const char *  target_url,
int  redirect_code 
)

Definition at line 4590 of file civetweb.c.

◆ mg_send_mime_file()

void mg_send_mime_file ( struct mg_connection conn,
const char *  path,
const char *  mime_type 
)

Definition at line 10199 of file civetweb.c.

◆ mg_send_mime_file2()

void mg_send_mime_file2 ( struct mg_connection conn,
const char *  path,
const char *  mime_type,
const char *  additional_headers 
)

Definition at line 10208 of file civetweb.c.

◆ mg_set_auth_handler()

void mg_set_auth_handler ( struct mg_context ctx,
const char *  uri,
mg_authorization_handler  handler,
void *  cbdata 
)

Definition at line 13821 of file civetweb.c.

◆ mg_set_request_handler()

void mg_set_request_handler ( struct mg_context ctx,
const char *  uri,
mg_request_handler  handler,
void *  cbdata 
)

Definition at line 13749 of file civetweb.c.

◆ mg_set_user_connection_data()

void mg_set_user_connection_data ( const struct mg_connection conn,
void *  data 
)

Definition at line 3188 of file civetweb.c.

◆ mg_set_websocket_handler()

void mg_set_websocket_handler ( struct mg_context ctx,
const char *  uri,
mg_websocket_connect_handler  connect_handler,
mg_websocket_ready_handler  ready_handler,
mg_websocket_data_handler  data_handler,
mg_websocket_close_handler  close_handler,
void *  cbdata 
)

Definition at line 13771 of file civetweb.c.

◆ mg_set_websocket_handler_with_subprotocols()

void mg_set_websocket_handler_with_subprotocols ( struct mg_context ctx,
const char *  uri,
struct mg_websocket_subprotocols subprotocols,
mg_websocket_connect_handler  connect_handler,
mg_websocket_ready_handler  ready_handler,
mg_websocket_data_handler  data_handler,
mg_websocket_close_handler  close_handler,
void *  cbdata 
)

Definition at line 13791 of file civetweb.c.

◆ mg_split_form_urlencoded()

int mg_split_form_urlencoded ( char *  data,
struct mg_header form_fields,
unsigned  num_form_fields 
)

Definition at line 7058 of file civetweb.c.

◆ mg_start()

struct mg_context * mg_start ( const struct mg_callbacks callbacks,
void *  user_data,
const char **  configuration_options 
)

Definition at line 20251 of file civetweb.c.

◆ mg_start2()

struct mg_context * mg_start2 ( struct mg_init_data init,
struct mg_error_data error 
)

Definition at line 19579 of file civetweb.c.

◆ mg_start_domain()

int mg_start_domain ( struct mg_context ctx,
const char **  configuration_options 
)

Definition at line 20455 of file civetweb.c.

◆ mg_start_domain2()

int mg_start_domain2 ( struct mg_context ctx,
const char **  configuration_options,
struct mg_error_data error 
)

Definition at line 20266 of file civetweb.c.

◆ mg_start_thread()

int mg_start_thread ( mg_thread_func_t  f,
void *  p 
)

Definition at line 5669 of file civetweb.c.

◆ mg_stop()

void mg_stop ( struct mg_context ctx)

Definition at line 19460 of file civetweb.c.

◆ mg_store_body()

long long mg_store_body ( struct mg_connection conn,
const char *  path 
)

Definition at line 10304 of file civetweb.c.

◆ mg_strcasecmp()

int mg_strcasecmp ( const char *  s1,
const char *  s2 
)

Definition at line 2997 of file civetweb.c.

◆ mg_strncasecmp()

int mg_strncasecmp ( const char *  s1,
const char *  s2,
size_t  len 
)

Definition at line 2982 of file civetweb.c.

◆ mg_unlock_connection()

void mg_unlock_connection ( struct mg_connection conn)

Definition at line 12289 of file civetweb.c.

◆ mg_unlock_context()

void mg_unlock_context ( struct mg_context ctx)

Definition at line 12305 of file civetweb.c.

◆ mg_url_decode()

int mg_url_decode ( const char *  src,
int  src_len,
char *  dst,
int  dst_len,
int  is_form_url_encoded 
)

Definition at line 6949 of file civetweb.c.

◆ mg_url_encode()

int mg_url_encode ( const char *  src,
char *  dst,
size_t  dst_len 
)

Definition at line 9260 of file civetweb.c.

◆ mg_version()

const char * mg_version ( void  )

Definition at line 3479 of file civetweb.c.

◆ mg_websocket_client_write()

int mg_websocket_client_write ( struct mg_connection conn,
int  opcode,
const char *  data,
size_t  data_len 
)

◆ mg_websocket_write()

int mg_websocket_write ( struct mg_connection conn,
int  opcode,
const char *  data,
size_t  data_len 
)

◆ mg_write()

int mg_write ( struct mg_connection conn,
const void *  buf,
size_t  len 
)

Definition at line 6694 of file civetweb.c.