21#ifndef MONGOOSE_HEADER_INCLUDED
22#define MONGOOSE_HEADER_INCLUDED
37 const char *request_method;
39 const char *http_version;
40 const char *query_string;
41 const char *remote_user;
69 void (*end_request)(
const struct mg_connection *,
int reply_status_code);
76 int (*init_ssl)(
void *ssl_context,
void *user_data);
96 char *data,
size_t data_len);
108 const char *path,
size_t *data_len);
120 void (*upload)(
struct mg_connection *,
const char *file_name);
139 const char *path,
char *etag,
size_t etag_len);
169 const char **configuration_options);
186const char *mg_get_option(
const struct mg_context *ctx,
const char *name);
193const char **mg_get_valid_option_names(
void);
208int mg_modify_passwords_file(
const char *passwords_file_name,
211 const char *password);
223int mg_write(
struct mg_connection *,
const void *buf,
size_t len);
234int mg_websocket_write(
struct mg_connection* conn,
int opcode,
235 const char *data,
size_t data_len);
239 WEBSOCKET_OPCODE_CONTINUATION = 0x0,
240 WEBSOCKET_OPCODE_TEXT = 0x1,
241 WEBSOCKET_OPCODE_BINARY = 0x2,
242 WEBSOCKET_OPCODE_CONNECTION_CLOSE = 0x8,
243 WEBSOCKET_OPCODE_PING = 0x9,
244 WEBSOCKET_OPCODE_PONG = 0xa
249#undef PRINTF_FORMAT_STRING
250#if defined(_MSC_VER) && _MSC_VER >= 1400
252#if defined(_MSC_VER) && _MSC_VER > 1400
253#define PRINTF_FORMAT_STRING(s) _Printf_format_string_ s
255#define PRINTF_FORMAT_STRING(s) __format_string s
258#define PRINTF_FORMAT_STRING(s) s
262#define PRINTF_ARGS(x, y) __attribute__((format(printf, x, y)))
264#define PRINTF_ARGS(x, y)
271 PRINTF_FORMAT_STRING(
const char *fmt), ...) PRINTF_ARGS(2, 3);
279void mg_send_file(
struct mg_connection *conn,
const char *path);
295const char *mg_get_header(
const struct mg_connection *,
const char *name);
317int mg_get_var(
const char *data,
size_t data_len,
318 const char *var_name,
char *dst,
size_t dst_len);
333int mg_get_cookie(
const char *cookie,
const char *var_name,
334 char *buf,
size_t buf_len);
351struct mg_connection *mg_download(
const char *host,
int port,
int use_ssl,
352 char *error_buffer,
size_t error_buffer_size,
353 PRINTF_FORMAT_STRING(
const char *request_fmt),
354 ...) PRINTF_ARGS(6, 7);
364int mg_upload(struct
mg_connection *conn, const
char *destination_dir);
369typedef
void * (*mg_thread_func_t)(
void *);
370int mg_start_thread(mg_thread_func_t f,
void *
p);
375const
char *mg_get_builtin_mime_type(const
char *file_name);
379const
char *mg_version(
void);
387int mg_url_decode(const
char *src,
int src_len,
char *dst,
388 int dst_len,
int is_form_url_encoded);
396char *mg_md5(
char buf[33], ...);
Definition: media-server.c:46
Definition: mongoose.h:59
Definition: mongoose.c:535
Definition: mongoose.c:514
Definition: mongoose.h:36
unsigned p
Definition: tte.h:17