MIDAS
Loading...
Searching...
No Matches
mongoose4.h File Reference
#include <stdio.h>
#include <stddef.h>
Include dependency graph for mongoose4.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mg_request_info
 
struct  mg_request_info::mg_header
 
struct  mg_event
 

Macros

#define MG_REQUEST_BEGIN   1
 
#define MG_REQUEST_END   2
 
#define MG_HTTP_ERROR   3
 
#define MG_EVENT_LOG   4
 
#define MG_THREAD_BEGIN   5
 
#define MG_THREAD_END   6
 
#define PRINTF_FORMAT_STRING(s)   s
 
#define PRINTF_ARGS(x, y)
 

Typedefs

typedef int(* mg_event_handler_t) (struct mg_event *event)
 
typedef void *(* mg_thread_func_t) (void *)
 

Enumerations

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
}
 

Functions

struct mg_contextmg_start (const char **configuration_options, mg_event_handler_t func, void *user_data)
 
void mg_stop (struct mg_context *)
 
void mg_websocket_handshake (struct mg_connection *)
 
int mg_websocket_read (struct mg_connection *, int *bits, char **data)
 
int mg_websocket_write (struct mg_connection *conn, int opcode, const char *data, size_t data_len)
 
const charmg_get_option (const struct mg_context *ctx, const char *name)
 
const char ** mg_get_valid_option_names (void)
 
int mg_modify_passwords_file (const char *passwords_file_name, const char *domain, const char *user, const char *password)
 
int mg_write (struct mg_connection *, const void *buf, int len)
 
int mg_printf (struct mg_connection *, PRINTF_FORMAT_STRING(const char *fmt),...) PRINTF_ARGS(2
 
int void mg_send_file (struct mg_connection *conn, const char *path)
 
int mg_read (struct mg_connection *, void *buf, int len)
 
const charmg_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_get_cookie (const char *cookie, const char *var_name, char *buf, size_t buf_len)
 
struct mg_connectionmg_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
 
struct mg_connection void mg_close_connection (struct mg_connection *conn)
 
FILEmg_upload (struct mg_connection *conn, const char *destination_dir, char *path, int path_len)
 
int mg_start_thread (mg_thread_func_t f, void *p)
 
const charmg_get_builtin_mime_type (const char *file_name)
 
const charmg_version (void)
 
int mg_url_decode (const char *src, int src_len, char *dst, int dst_len, int is_form_url_encoded)
 
charmg_md5 (char buf[33],...)