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);
156 const char **configuration_options);
173 const char *mg_get_option(
const struct mg_context *ctx,
const char *name);
180 const char **mg_get_valid_option_names(
void);
195 int mg_modify_passwords_file(
const char *passwords_file_name,
198 const char *password);
210 int mg_write(
struct mg_connection *,
const void *buf,
size_t len);
221 int mg_websocket_write(
struct mg_connection* conn,
int opcode,
222 const char *data,
size_t data_len);
226 WEBSOCKET_OPCODE_CONTINUATION = 0x0,
227 WEBSOCKET_OPCODE_TEXT = 0x1,
228 WEBSOCKET_OPCODE_BINARY = 0x2,
229 WEBSOCKET_OPCODE_CONNECTION_CLOSE = 0x8,
230 WEBSOCKET_OPCODE_PING = 0x9,
231 WEBSOCKET_OPCODE_PONG = 0xa
236 #undef PRINTF_FORMAT_STRING 237 #if defined(_MSC_VER) && _MSC_VER >= 1400 239 #if defined(_MSC_VER) && _MSC_VER > 1400 240 #define PRINTF_FORMAT_STRING(s) _Printf_format_string_ s 242 #define PRINTF_FORMAT_STRING(s) __format_string s 245 #define PRINTF_FORMAT_STRING(s) s 249 #define PRINTF_ARGS(x, y) __attribute__((format(printf, x, y))) 251 #define PRINTF_ARGS(x, y) 258 PRINTF_FORMAT_STRING(
const char *fmt), ...) PRINTF_ARGS(2, 3);
262 void mg_send_file(struct
mg_connection *conn, const
char *path);
278 const
char *mg_get_header(const struct mg_connection *, const
char *name);
300 int mg_get_var(const
char *data,
size_t data_len,
301 const
char *var_name,
char *dst,
size_t dst_len);
316 int mg_get_cookie(const
char *cookie, const
char *var_name,
317 char *buf,
size_t buf_len);
334 struct mg_connection *mg_download(const
char *host,
int port,
int use_ssl,
335 char *error_buffer,
size_t error_buffer_size,
336 PRINTF_FORMAT_STRING(const
char *request_fmt),
337 ...) PRINTF_ARGS(6, 7);
341 void mg_close_connection(struct mg_connection *conn);
347 int mg_upload(struct mg_connection *conn, const
char *destination_dir);
352 typedef
void * (*mg_thread_func_t)(
void *);
353 int mg_start_thread(mg_thread_func_t f,
void *p);
358 const
char *mg_get_builtin_mime_type(const
char *file_name);
362 const
char *mg_version(
void);
370 int mg_url_decode(const
char *src,
int src_len,
char *dst,
371 int dst_len,
int is_form_url_encoded);
379 char *mg_md5(
char buf[33], ...);
384 #endif // __cplusplus 386 #endif // MONGOOSE_HEADER_INCLUDED Definition: media-server.c:33
Definition: mongoose.h:60
Definition: mongoose.h:37
Definition: mongoose.c:526
Definition: mongoose.c:505