18#ifndef MONGOOSE_HEADER_INCLUDED
19#define MONGOOSE_HEADER_INCLUDED
55#define MG_REQUEST_BEGIN 1
56#define MG_REQUEST_END 2
57#define MG_HTTP_ERROR 3
59#define MG_THREAD_BEGIN 5
60#define MG_THREAD_END 6
79 const char *
data,
size_t data_len);
95 const char *password);
99#undef PRINTF_FORMAT_STRING
100#if defined(_MSC_VER) && _MSC_VER >= 1400
102#if defined(_MSC_VER) && _MSC_VER > 1400
103#define PRINTF_FORMAT_STRING(s) _Printf_format_string_ s
105#define PRINTF_FORMAT_STRING(s) __format_string s
108#define PRINTF_FORMAT_STRING(s) s
112#define PRINTF_ARGS(x, y) __attribute__((format(printf, x, y)))
114#define PRINTF_ARGS(x, y)
245char *
mg_md5(
char buf[33], ...);
int mg_modify_passwords_file(const char *passwords_file_name, const char *domain, const char *user, const char *password)
int mg_websocket_read(struct mg_connection *, int *bits, char **data)
void *(* mg_thread_func_t)(void *)
struct mg_connection void mg_close_connection(struct mg_connection *conn)
int mg_websocket_write(struct mg_connection *conn, int opcode, const char *data, size_t data_len)
#define PRINTF_FORMAT_STRING(s)
const char * mg_get_option(const struct mg_context *ctx, const char *name)
const char * mg_get_header(const struct mg_connection *, const char *name)
int mg_get_var(const char *data, size_t data_len, const char *var_name, char *dst, size_t dst_len)
int mg_start_thread(mg_thread_func_t f, void *p)
const char * request_method
struct mg_request_info * request_info
struct mg_connection * conn
char * mg_md5(char buf[33],...)
const char * query_string
struct mg_context * mg_start(const char **configuration_options, mg_event_handler_t func, void *user_data)
int mg_url_decode(const char *src, int src_len, char *dst, int dst_len, int is_form_url_encoded)
int mg_printf(struct mg_connection *, PRINTF_FORMAT_STRING(const char *fmt),...) PRINTF_ARGS(2
#define PRINTF_ARGS(x, y)
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
int mg_write(struct mg_connection *, const void *buf, int len)
const char * mg_get_builtin_mime_type(const char *file_name)
const char ** mg_get_valid_option_names(void)
FILE * mg_upload(struct mg_connection *conn, const char *destination_dir, char *path, int path_len)
int void mg_send_file(struct mg_connection *conn, const char *path)
const char * http_version
int mg_get_cookie(const char *cookie, const char *var_name, char *buf, size_t buf_len)
void mg_stop(struct mg_context *)
int(* mg_event_handler_t)(struct mg_event *event)
void mg_websocket_handshake(struct mg_connection *)
const char * mg_version(void)
struct mg_request_info::mg_header http_headers[64]
int mg_read(struct mg_connection *, void *buf, int len)
@ WEBSOCKET_OPCODE_CONNECTION_CLOSE
@ WEBSOCKET_OPCODE_CONTINUATION
@ WEBSOCKET_OPCODE_BINARY
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)