First step towards separate userdata argument

PUBLISHED_FROM=93fe1cc2c5e2513509511a81e5919cbd37056b10
This commit is contained in:
Dmitry Frank authored and Cesanta Bot committed 2017-03-15 00:52:59 +00:00
1 parent c416012f97
commit 0fc3370859
16 files changed
+241 -158

No files matched your search

+3 -1
View File
@@ -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 -3
View File
@@ -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 -2
View File
@@ -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.
+2 -2
View File
@@ -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.
+2 -1
View File
@@ -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.
+2 -1
View File
@@ -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.
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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.