mirror of
https://github.com/lammertb/libhttp.git
synced 2025-07-29 21:01:13 +03:00
Clean usage of const/not const mg_context* and mg_connection* handles in the API.
The API had an inconsistant usage of `const mg_connection *` and `mg_connection *`, that may cause warnings (e.g., #109). Now all non-const `mg_connection *` is only required to read/write the connection.
This commit is contained in:
@ -22,14 +22,14 @@ typedef struct tWebSockContext {
|
||||
} tWebSockContext;
|
||||
|
||||
|
||||
void websock_init_lib(struct mg_context *ctx);
|
||||
void websock_exit_lib(struct mg_context *ctx);
|
||||
void websock_init_lib(const struct mg_context *ctx);
|
||||
void websock_exit_lib(const struct mg_context *ctx);
|
||||
|
||||
void websock_send_broadcast(struct mg_context *ctx, const char * data, int data_len);
|
||||
|
||||
void websocket_ready_handler(struct mg_connection *conn);
|
||||
int websocket_data_handler(struct mg_connection *conn, int flags, char *data, size_t data_len);
|
||||
void connection_close_handler(struct mg_connection *conn);
|
||||
void connection_close_handler(const struct mg_connection *conn);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user