mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-15 10:29:47 +00:00
First step towards separate userdata argument
PUBLISHED_FROM=93fe1cc2c5e2513509511a81e5919cbd37056b10
This commit is contained in:
1 parent
c416012f97
commit
0fc3370859
16 files changed
+241
-158
No files matched your search
@@ -4,9 +4,8 @@ decl_name: "mg_connect_ws"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_connect_ws(struct mg_mgr *mgr,
|
||||
mg_event_handler_t event_handler,
|
||||
const char *url, const char *protocol,
|
||||
const char *extra_headers);
|
||||
MG_CB(mg_event_handler_t event_handler,
|
||||
void *user_data);
|
||||
---
|
||||
|
||||
Helper function that creates an outbound WebSocket connection.
|
||||
|
||||
@@ -3,11 +3,8 @@ title: "mg_connect_ws_opt()"
|
||||
decl_name: "mg_connect_ws_opt"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_connect_ws_opt(struct mg_mgr *mgr,
|
||||
mg_event_handler_t ev_handler,
|
||||
struct mg_connect_opts opts,
|
||||
const char *url, const char *protocol,
|
||||
const char *extra_headers);
|
||||
struct mg_connection *mg_connect_ws_opt(
|
||||
struct mg_mgr *mgr, MG_CB(mg_event_handler_t ev_handler, void *user_data);
|
||||
---
|
||||
|
||||
Helper function that creates an outbound WebSocket connection
|
||||
|
||||
@@ -3,11 +3,9 @@ title: "mg_connect_http()"
|
||||
decl_name: "mg_connect_http"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_connect_http(struct mg_mgr *mgr,
|
||||
mg_event_handler_t event_handler,
|
||||
const char *url,
|
||||
const char *extra_headers,
|
||||
const char *post_data);
|
||||
struct mg_connection *mg_connect_http(
|
||||
struct mg_mgr *mgr,
|
||||
MG_CB(mg_event_handler_t event_handler, void *user_data);
|
||||
---
|
||||
|
||||
Helper function that creates an outbound HTTP connection.
|
||||
|
||||
@@ -3,12 +3,8 @@ title: "mg_connect_http_opt()"
|
||||
decl_name: "mg_connect_http_opt"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_connect_http_opt(struct mg_mgr *mgr,
|
||||
mg_event_handler_t ev_handler,
|
||||
struct mg_connect_opts opts,
|
||||
const char *url,
|
||||
const char *extra_headers,
|
||||
const char *post_data);
|
||||
struct mg_connection *mg_connect_http_opt(
|
||||
struct mg_mgr *mgr, MG_CB(mg_event_handler_t ev_handler, void *user_data);
|
||||
---
|
||||
|
||||
Helper function that creates an outbound HTTP connection.
|
||||
|
||||
@@ -4,7 +4,8 @@ decl_name: "mg_file_upload_handler"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
void mg_file_upload_handler(struct mg_connection *nc, int ev, void *ev_data,
|
||||
mg_fu_fname_fn local_name_fn);
|
||||
mg_fu_fname_fn local_name_fn
|
||||
MG_UD_ARG(void *user_data);
|
||||
---
|
||||
|
||||
File upload handler.
|
||||
|
||||
@@ -3,7 +3,9 @@ title: "mg_add_sock()"
|
||||
decl_name: "mg_add_sock"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_add_sock(struct mg_mgr *, sock_t, mg_event_handler_t);
|
||||
struct mg_connection *mg_add_sock(struct mg_mgr *mgr, sock_t sock,
|
||||
MG_CB(mg_event_handler_t handler,
|
||||
void *user_data);
|
||||
---
|
||||
|
||||
Creates a connection, associates it with the given socket and event handler
|
||||
|
||||
@@ -3,9 +3,9 @@ title: "mg_add_sock_opt()"
|
||||
decl_name: "mg_add_sock_opt"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_add_sock_opt(struct mg_mgr *, sock_t,
|
||||
mg_event_handler_t,
|
||||
struct mg_add_sock_opts);
|
||||
struct mg_connection *mg_add_sock_opt(struct mg_mgr *mgr, sock_t sock,
|
||||
MG_CB(mg_event_handler_t handler,
|
||||
void *user_data);
|
||||
---
|
||||
|
||||
Creates a connection, associates it with the given socket and event handler
|
||||
|
||||
@@ -3,8 +3,9 @@ title: "mg_bind()"
|
||||
decl_name: "mg_bind"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_bind(struct mg_mgr *, const char *,
|
||||
mg_event_handler_t);
|
||||
struct mg_connection *mg_bind(struct mg_mgr *mgr, const char *address,
|
||||
MG_CB(mg_event_handler_t handler,
|
||||
void *user_data);
|
||||
---
|
||||
|
||||
Creates a listening connection.
|
||||
|
||||
@@ -4,8 +4,8 @@ decl_name: "mg_bind_opt"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_bind_opt(struct mg_mgr *mgr, const char *address,
|
||||
mg_event_handler_t handler,
|
||||
struct mg_bind_opts opts);
|
||||
MG_CB(mg_event_handler_t handler,
|
||||
void *user_data);
|
||||
---
|
||||
|
||||
Creates a listening connection.
|
||||
|
||||
@@ -3,7 +3,8 @@ title: "mg_broadcast()"
|
||||
decl_name: "mg_broadcast"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
void mg_broadcast(struct mg_mgr *, mg_event_handler_t func, void *, size_t);
|
||||
void mg_broadcast(struct mg_mgr *mgr, mg_event_handler_t cb, void *data,
|
||||
size_t len);
|
||||
---
|
||||
|
||||
Passes a message of a given length to all connections.
|
||||
|
||||
@@ -4,7 +4,8 @@ decl_name: "mg_connect"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_connect(struct mg_mgr *mgr, const char *address,
|
||||
mg_event_handler_t handler);
|
||||
MG_CB(mg_event_handler_t handler,
|
||||
void *user_data);
|
||||
---
|
||||
|
||||
Connects to a remote host.
|
||||
|
||||
@@ -4,8 +4,8 @@ decl_name: "mg_connect_opt"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_connect_opt(struct mg_mgr *mgr, const char *address,
|
||||
mg_event_handler_t handler,
|
||||
struct mg_connect_opts opts);
|
||||
MG_CB(mg_event_handler_t handler,
|
||||
void *user_data);
|
||||
---
|
||||
|
||||
Connects to a remote host.
|
||||
|
||||
@@ -4,7 +4,7 @@ decl_name: "mg_event_handler_t"
|
||||
symbol_kind: "typedef"
|
||||
signature: |
|
||||
typedef void (*mg_event_handler_t)(struct mg_connection *nc, int ev,
|
||||
void *ev_data);
|
||||
void *ev_data MG_UD_ARG(void *user_data));
|
||||
---
|
||||
|
||||
Callback function (event handler) prototype. Must be defined by the user.
|
||||
|
||||
@@ -3,7 +3,7 @@ title: "mg_next()"
|
||||
decl_name: "mg_next"
|
||||
symbol_kind: "func"
|
||||
signature: |
|
||||
struct mg_connection *mg_next(struct mg_mgr *, struct mg_connection *);
|
||||
struct mg_connection *mg_next(struct mg_mgr *mgr, struct mg_connection *c);
|
||||
---
|
||||
|
||||
Iterates over all active connections.
|
||||
|
||||
Reference in new issue
Block a user