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 8644 of file civetweb.c.

◆ mg_check_feature()

unsigned mg_check_feature ( unsigned  feature)

Definition at line 20497 of file civetweb.c.

◆ mg_close_connection()

void mg_close_connection ( struct mg_connection conn)

Definition at line 17154 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 17426 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 17414 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 18365 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 18421 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 18395 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 18451 of file civetweb.c.

◆ mg_cry()

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

Definition at line 3468 of file civetweb.c.

◆ mg_disable_connection_keep_alive()

void mg_disable_connection_keep_alive ( struct mg_connection conn)

Definition at line 21110 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 18032 of file civetweb.c.

◆ mg_exit_library()

unsigned mg_exit_library ( void  )

Definition at line 21478 of file civetweb.c.

◆ mg_get_builtin_mime_type()

const char * mg_get_builtin_mime_type ( const char *  file_name)

Definition at line 8136 of file civetweb.c.

◆ mg_get_context()

struct mg_context * mg_get_context ( const struct mg_connection conn)

Definition at line 3153 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 20911 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 7159 of file civetweb.c.

◆ mg_get_header()

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

Definition at line 3802 of file civetweb.c.

◆ mg_get_option()

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

Definition at line 3138 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 3488 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 3689 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 17980 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 4152 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 3528 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 3213 of file civetweb.c.

◆ mg_get_system_info()

int mg_get_system_info ( char *  buffer,
int  buflen 
)

Definition at line 20579 of file civetweb.c.

◆ mg_get_thread_pointer()

void * mg_get_thread_pointer ( const struct mg_connection conn)

Definition at line 3174 of file civetweb.c.

◆ mg_get_user_connection_data()

void * mg_get_user_connection_data ( const struct mg_connection conn)

Definition at line 3203 of file civetweb.c.

◆ mg_get_user_context_data()

void * mg_get_user_context_data ( const struct mg_connection conn)

Definition at line 3167 of file civetweb.c.

◆ mg_get_user_data()

void * mg_get_user_data ( const struct mg_context ctx)

Definition at line 3160 of file civetweb.c.

◆ mg_get_valid_options()

const struct mg_option * mg_get_valid_options ( void  )

Definition at line 2798 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 6991 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 7002 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 21374 of file civetweb.c.

◆ mg_lock_connection()

void mg_lock_connection ( struct mg_connection conn)

Definition at line 12307 of file civetweb.c.

◆ mg_lock_context()

void mg_lock_context ( struct mg_context ctx)

Definition at line 12323 of file civetweb.c.

◆ mg_md5()

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

Definition at line 8208 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 8927 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 8937 of file civetweb.c.

◆ mg_printf()

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

Definition at line 6937 of file civetweb.c.

◆ mg_read()

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

Definition at line 6588 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 6777 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 8773 of file civetweb.c.

◆ mg_send_file()

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

Definition at line 10206 of file civetweb.c.

◆ mg_send_file_body()

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

Definition at line 10147 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 4537 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 4551 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 4592 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 10213 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 10222 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 13847 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 13775 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 3190 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 13797 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 13817 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 7060 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 20285 of file civetweb.c.

◆ mg_start2()

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

Definition at line 19613 of file civetweb.c.

◆ mg_start_domain()

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

Definition at line 20489 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 20300 of file civetweb.c.

◆ mg_start_thread()

int mg_start_thread ( mg_thread_func_t  f,
void *  p 
)

Definition at line 5671 of file civetweb.c.

◆ mg_stop()

void mg_stop ( struct mg_context ctx)

Definition at line 19494 of file civetweb.c.

◆ mg_store_body()

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

Definition at line 10318 of file civetweb.c.

◆ mg_strcasecmp()

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

Definition at line 2999 of file civetweb.c.

◆ mg_strncasecmp()

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

Definition at line 2984 of file civetweb.c.

◆ mg_unlock_connection()

void mg_unlock_connection ( struct mg_connection conn)

Definition at line 12315 of file civetweb.c.

◆ mg_unlock_context()

void mg_unlock_context ( struct mg_context ctx)

Definition at line 12331 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 6951 of file civetweb.c.

◆ mg_url_encode()

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

Definition at line 9262 of file civetweb.c.

◆ mg_version()

const char * mg_version ( void  )

Definition at line 3481 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 6696 of file civetweb.c.