Logo ROOT   6.14/05
Reference Guide
Classes | Macros | Typedefs | Enumerations | Functions
civetweb.h File Reference
#include <stdio.h>
#include <stddef.h>
Include dependency graph for civetweb.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  client_cert
 
struct  mg_callbacks
 
struct  mg_client_cert
 
struct  mg_client_options
 
struct  mg_form_data_handler
 
struct  mg_header
 
struct  mg_option
 
struct  mg_request_info
 
struct  mg_response_info
 
struct  mg_server_ports
 
struct  mg_websocket_subprotocols
 

Macros

#define CIVETWEB_API
 
#define CIVETWEB_VERSION   "1.10"
 
#define CIVETWEB_VERSION_MAJOR   (1)
 
#define CIVETWEB_VERSION_MINOR   (10)
 
#define CIVETWEB_VERSION_PATCH   (0)
 
#define CIVETWEB_VERSION_RELEASED
 
#define MG_MAX_HEADERS   (64)
 
#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  {
  CONFIG_TYPE_UNKNOWN = 0x0, CONFIG_TYPE_NUMBER = 0x1, CONFIG_TYPE_STRING = 0x2, CONFIG_TYPE_FILE = 0x3,
  CONFIG_TYPE_DIRECTORY = 0x4, CONFIG_TYPE_BOOLEAN = 0x5, CONFIG_TYPE_EXT_PATTERN = 0x6, CONFIG_TYPE_STRING_LIST = 0x7,
  CONFIG_TYPE_STRING_MULTILINE = 0x8
}
 
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
}
 
enum  {
  WEBSOCKET_OPCODE_CONTINUATION = 0x0, WEBSOCKET_OPCODE_TEXT = 0x1, WEBSOCKET_OPCODE_BINARY = 0x2, WEBSOCKET_OPCODE_CONNECTION_CLOSE = 0x8,
  WEBSOCKET_OPCODE_PING = 0x9, WEBSOCKET_OPCODE_PONG = 0xa
}
 
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  { FORM_FIELD_STORAGE_SKIP = 0x0, FORM_FIELD_STORAGE_GET = 0x1, FORM_FIELD_STORAGE_STORE = 0x2, FORM_FIELD_STORAGE_ABORT = 0x10 }
 
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  { TIMEOUT_INFINITE = -1 }
 
enum  { MG_TIMEOUT_INFINITE = -1 }
 

Functions

CIVETWEB_API int mg_check_digest_access_authentication (struct mg_connection *conn, const char *realm, const char *filename)
 
CIVETWEB_API unsigned mg_check_feature (unsigned feature)
 
CIVETWEB_API struct mg_connection CIVETWEB_API void mg_close_connection (struct mg_connection *conn)
 
CIVETWEB_API struct mg_connection * mg_connect_client (const char *host, int port, int use_ssl, char *error_buffer, size_t error_buffer_size)
 
CIVETWEB_API struct mg_connection * mg_connect_client_secure (const struct mg_client_options *client_options, char *error_buffer, size_t error_buffer_size)
 
CIVETWEB_API 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)
 
CIVETWEB_API void mg_cry (const struct mg_connection *conn, PRINTF_FORMAT_STRING(const char *fmt),...) PRINTF_ARGS(2
 
CIVETWEB_API struct mg_connection * mg_download (const char *host, int port, int use_ssl, char *error_buffer, size_t error_buffer_size, PRINTF_FORMAT_STRING(const char *request_fmt),...) PRINTF_ARGS(6
 
CIVETWEB_API unsigned mg_exit_library (void)
 
CIVETWEB_API const char * mg_get_builtin_mime_type (const char *file_name)
 
CIVETWEB_API struct mg_context * mg_get_context (const struct mg_connection *conn)
 
CIVETWEB_API int mg_get_context_info (const struct mg_context *ctx, char *buffer, int buflen)
 
CIVETWEB_API int mg_get_cookie (const char *cookie, const char *var_name, char *buf, size_t buf_len)
 
CIVETWEB_API const char * mg_get_header (const struct mg_connection *, const char *name)
 
CIVETWEB_API const char * mg_get_option (const struct mg_context *ctx, const char *name)
 
CIVETWEB_API const struct mg_request_infomg_get_request_info (const struct mg_connection *)
 
CIVETWEB_API int mg_get_request_link (const struct mg_connection *conn, char *buf, size_t buflen)
 
CIVETWEB_API int mg_get_response (struct mg_connection *conn, char *ebuf, size_t ebuf_len, int timeout)
 
CIVETWEB_API const char * mg_get_response_code_text (const struct mg_connection *conn, int response_code)
 
CIVETWEB_API const struct mg_response_infomg_get_response_info (const struct mg_connection *)
 
CIVETWEB_API int mg_get_server_ports (const struct mg_context *ctx, int size, struct mg_server_ports *ports)
 
CIVETWEB_API int mg_get_system_info (char *buffer, int buflen)
 
CIVETWEB_API voidmg_get_user_connection_data (const struct mg_connection *conn)
 
CIVETWEB_API voidmg_get_user_data (const struct mg_context *ctx)
 
CIVETWEB_API const struct mg_optionmg_get_valid_options (void)
 
CIVETWEB_API int mg_get_var (const char *data, size_t data_len, const char *var_name, char *dst, size_t dst_len)
 
CIVETWEB_API int mg_get_var2 (const char *data, size_t data_len, const char *var_name, char *dst, size_t dst_len, size_t occurrence)
 
CIVETWEB_API int mg_handle_form_request (struct mg_connection *conn, struct mg_form_data_handler *fdh)
 
CIVETWEB_API unsigned mg_init_library (unsigned features)
 
CIVETWEB_API void mg_lock_connection (struct mg_connection *conn)
 
CIVETWEB_API void mg_lock_context (struct mg_context *ctx)
 
CIVETWEB_API char * mg_md5 (char buf[33],...)
 
CIVETWEB_API int mg_modify_passwords_file (const char *passwords_file_name, const char *realm, const char *user, const char *password)
 
CIVETWEB_API int mg_printf (struct mg_connection *, PRINTF_FORMAT_STRING(const char *fmt),...) PRINTF_ARGS(2
 
CIVETWEB_API int mg_read (struct mg_connection *, void *buf, size_t len)
 
CIVETWEB_API int CIVETWEB_API int mg_send_chunk (struct mg_connection *conn, const char *chunk, unsigned int chunk_len)
 
CIVETWEB_API void CIVETWEB_API int mg_send_digest_access_authentication_request (struct mg_connection *conn, const char *realm)
 
CIVETWEB_API void mg_send_file (struct mg_connection *conn, const char *path)
 
CIVETWEB_API void mg_send_http_error (struct mg_connection *conn, int status_code, PRINTF_FORMAT_STRING(const char *fmt),...) PRINTF_ARGS(3
 
CIVETWEB_API void mg_send_mime_file (struct mg_connection *conn, const char *path, const char *mime_type)
 
CIVETWEB_API void mg_send_mime_file2 (struct mg_connection *conn, const char *path, const char *mime_type, const char *additional_headers)
 
CIVETWEB_API void mg_set_auth_handler (struct mg_context *ctx, const char *uri, mg_authorization_handler handler, void *cbdata)
 
CIVETWEB_API void mg_set_request_handler (struct mg_context *ctx, const char *uri, mg_request_handler handler, void *cbdata)
 
CIVETWEB_API void mg_set_user_connection_data (struct mg_connection *conn, void *data)
 
CIVETWEB_API 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)
 
CIVETWEB_API 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)
 
CIVETWEB_API struct mg_context * mg_start (const struct mg_callbacks *callbacks, void *user_data, const char **configuration_options)
 
CIVETWEB_API int mg_start_thread (mg_thread_func_t f, void *p)
 
CIVETWEB_API void mg_stop (struct mg_context *)
 
CIVETWEB_API long long mg_store_body (struct mg_connection *conn, const char *path)
 
CIVETWEB_API void CIVETWEB_API int mg_strcasecmp (const char *s1, const char *s2)
 
CIVETWEB_API int mg_strncasecmp (const char *s1, const char *s2, size_t len)
 
CIVETWEB_API void mg_unlock_connection (struct mg_connection *conn)
 
CIVETWEB_API void mg_unlock_context (struct mg_context *ctx)
 
CIVETWEB_API int mg_url_decode (const char *src, int src_len, char *dst, int dst_len, int is_form_url_encoded)
 
CIVETWEB_API int mg_url_encode (const char *src, char *dst, size_t dst_len)
 
CIVETWEB_API const char * mg_version (void)
 
CIVETWEB_API int mg_websocket_client_write (struct mg_connection *conn, int opcode, const char *data, size_t data_len)
 
CIVETWEB_API int mg_websocket_write (struct mg_connection *conn, int opcode, const char *data, size_t data_len)
 
CIVETWEB_API int mg_write (struct mg_connection *, const void *buf, size_t len)
 

Macro Definition Documentation

◆ CIVETWEB_API

#define CIVETWEB_API

Definition at line 44 of file civetweb.h.

◆ CIVETWEB_VERSION

#define CIVETWEB_VERSION   "1.10"

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   (10)

Definition at line 28 of file civetweb.h.

◆ CIVETWEB_VERSION_PATCH

#define CIVETWEB_VERSION_PATCH   (0)

Definition at line 29 of file civetweb.h.

◆ CIVETWEB_VERSION_RELEASED

#define CIVETWEB_VERSION_RELEASED

Definition at line 30 of file civetweb.h.

◆ MG_MAX_HEADERS

#define MG_MAX_HEADERS   (64)

Definition at line 80 of file civetweb.h.

◆ PRINTF_ARGS

#define PRINTF_ARGS (   x,
  y 
)

Definition at line 778 of file civetweb.h.

◆ PRINTF_FORMAT_STRING

#define PRINTF_FORMAT_STRING (   s)    s

Definition at line 772 of file civetweb.h.

Typedef Documentation

◆ mg_authorization_handler

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

Definition at line 500 of file civetweb.h.

◆ mg_request_handler

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

Definition at line 387 of file civetweb.h.

◆ mg_thread_func_t

typedef void*(* mg_thread_func_t) (void *)

Definition at line 1126 of file civetweb.h.

◆ mg_websocket_close_handler

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

Definition at line 449 of file civetweb.h.

◆ mg_websocket_connect_handler

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

Definition at line 441 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 444 of file civetweb.h.

◆ mg_websocket_ready_handler

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

Definition at line 443 of file civetweb.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CONFIG_TYPE_UNKNOWN 
CONFIG_TYPE_NUMBER 
CONFIG_TYPE_STRING 
CONFIG_TYPE_FILE 
CONFIG_TYPE_DIRECTORY 
CONFIG_TYPE_BOOLEAN 
CONFIG_TYPE_EXT_PATTERN 
CONFIG_TYPE_STRING_LIST 
CONFIG_TYPE_STRING_MULTILINE 

Definition at line 573 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 

Definition at line 586 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
WEBSOCKET_OPCODE_CONTINUATION 
WEBSOCKET_OPCODE_TEXT 
WEBSOCKET_OPCODE_BINARY 
WEBSOCKET_OPCODE_CONNECTION_CLOSE 
WEBSOCKET_OPCODE_PING 
WEBSOCKET_OPCODE_PONG 

Definition at line 743 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 753 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
FORM_FIELD_STORAGE_SKIP 
FORM_FIELD_STORAGE_GET 
FORM_FIELD_STORAGE_STORE 
FORM_FIELD_STORAGE_ABORT 

Definition at line 1088 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 1101 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
TIMEOUT_INFINITE 

Definition at line 1254 of file civetweb.h.

◆ anonymous enum

anonymous enum
Enumerator
MG_TIMEOUT_INFINITE 

Definition at line 1255 of file civetweb.h.

Function Documentation

◆ mg_check_digest_access_authentication()

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

Definition at line 7769 of file civetweb.c.

◆ mg_check_feature()

CIVETWEB_API unsigned mg_check_feature ( unsigned  feature)

Definition at line 16992 of file civetweb.c.

◆ mg_close_connection()

CIVETWEB_API struct mg_connection CIVETWEB_API void mg_close_connection ( struct mg_connection *  conn)

Definition at line 14779 of file civetweb.c.

◆ mg_connect_client()

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

◆ mg_connect_client_secure()

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

◆ mg_connect_websocket_client()

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

◆ mg_cry()

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

◆ mg_download()

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

◆ mg_exit_library()

CIVETWEB_API unsigned mg_exit_library ( void  )

Definition at line 18015 of file civetweb.c.

◆ mg_get_builtin_mime_type()

CIVETWEB_API const char* mg_get_builtin_mime_type ( const char *  file_name)

Definition at line 7247 of file civetweb.c.

◆ mg_get_context()

CIVETWEB_API struct mg_context* mg_get_context ( const struct mg_connection *  conn)

Definition at line 3122 of file civetweb.c.

◆ mg_get_context_info()

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

Definition at line 17900 of file civetweb.c.

◆ mg_get_cookie()

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

Definition at line 6460 of file civetweb.c.

◆ mg_get_header()

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

Definition at line 3628 of file civetweb.c.

◆ mg_get_option()

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

Definition at line 3108 of file civetweb.c.

◆ mg_get_request_info()

CIVETWEB_API const struct mg_request_info* mg_get_request_info ( const struct mg_connection *  )

Definition at line 3368 of file civetweb.c.

◆ mg_get_request_link()

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

Definition at line 3437 of file civetweb.c.

◆ mg_get_response()

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

Definition at line 15471 of file civetweb.c.

◆ mg_get_response_code_text()

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

Definition at line 3926 of file civetweb.c.

◆ mg_get_response_info()

CIVETWEB_API const struct mg_response_info* mg_get_response_info ( const struct mg_connection *  )

Definition at line 3397 of file civetweb.c.

◆ mg_get_server_ports()

CIVETWEB_API int mg_get_server_ports ( const struct mg_context *  ctx,
int  size,
struct mg_server_ports ports 
)

Definition at line 3179 of file civetweb.c.

◆ mg_get_system_info()

CIVETWEB_API int mg_get_system_info ( char *  buffer,
int  buflen 
)

Definition at line 17885 of file civetweb.c.

◆ mg_get_user_connection_data()

CIVETWEB_API void* mg_get_user_connection_data ( const struct mg_connection *  conn)

Definition at line 3145 of file civetweb.c.

◆ mg_get_user_data()

CIVETWEB_API void* mg_get_user_data ( const struct mg_context *  ctx)

Definition at line 3129 of file civetweb.c.

◆ mg_get_valid_options()

CIVETWEB_API const struct mg_option* mg_get_valid_options ( void  )

Definition at line 2735 of file civetweb.c.

◆ mg_get_var()

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

Definition at line 6391 of file civetweb.c.

◆ mg_get_var2()

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

◆ mg_handle_form_request()

CIVETWEB_API int mg_handle_form_request ( struct mg_connection *  conn,
struct mg_form_data_handler fdh 
)

Definition at line 175 of file handle_form.inl.

◆ mg_init_library()

CIVETWEB_API unsigned mg_init_library ( unsigned  features)

Definition at line 17941 of file civetweb.c.

◆ mg_lock_connection()

CIVETWEB_API void mg_lock_connection ( struct mg_connection *  conn)

Definition at line 11113 of file civetweb.c.

◆ mg_lock_context()

CIVETWEB_API void mg_lock_context ( struct mg_context *  ctx)

Definition at line 11129 of file civetweb.c.

◆ mg_md5()

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

Definition at line 7319 of file civetweb.c.

◆ mg_modify_passwords_file()

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

Definition at line 7918 of file civetweb.c.

◆ mg_printf()

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

◆ mg_read()

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

Definition at line 6038 of file civetweb.c.

◆ mg_send_chunk()

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

Definition at line 6200 of file civetweb.c.

◆ mg_send_digest_access_authentication_request()

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

Definition at line 7884 of file civetweb.c.

◆ mg_send_file()

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

Definition at line 9027 of file civetweb.c.

◆ mg_send_http_error()

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

◆ mg_send_mime_file()

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

Definition at line 9034 of file civetweb.c.

◆ mg_send_mime_file2()

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

Definition at line 9043 of file civetweb.c.

◆ mg_set_auth_handler()

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

Definition at line 12261 of file civetweb.c.

◆ mg_set_request_handler()

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

Definition at line 12191 of file civetweb.c.

◆ mg_set_user_connection_data()

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

Definition at line 3136 of file civetweb.c.

◆ mg_set_websocket_handler()

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

◆ mg_set_websocket_handler_with_subprotocols()

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

◆ mg_start()

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

Definition at line 16676 of file civetweb.c.

◆ mg_start_thread()

CIVETWEB_API int mg_start_thread ( mg_thread_func_t  f,
void p 
)

Definition at line 5213 of file civetweb.c.

◆ mg_stop()

CIVETWEB_API void mg_stop ( struct mg_context *  )

Definition at line 16590 of file civetweb.c.

◆ mg_store_body()

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

Definition at line 9130 of file civetweb.c.

◆ mg_strcasecmp()

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

Definition at line 2977 of file civetweb.c.

◆ mg_strncasecmp()

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

Definition at line 2962 of file civetweb.c.

◆ mg_unlock_connection()

CIVETWEB_API void mg_unlock_connection ( struct mg_connection *  conn)

Definition at line 11121 of file civetweb.c.

◆ mg_unlock_context()

CIVETWEB_API void mg_unlock_context ( struct mg_context *  ctx)

Definition at line 11137 of file civetweb.c.

◆ mg_url_decode()

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

Definition at line 6360 of file civetweb.c.

◆ mg_url_encode()

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

Definition at line 8243 of file civetweb.c.

◆ mg_version()

CIVETWEB_API const char* mg_version ( void  )

Definition at line 3361 of file civetweb.c.

◆ mg_websocket_client_write()

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

◆ mg_websocket_write()

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

◆ mg_write()

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

Definition at line 6138 of file civetweb.c.