1
0
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:
bel
2015-04-29 00:13:25 +02:00
parent f9295dffa6
commit d264808e52
10 changed files with 68 additions and 40 deletions

View File

@ -67,7 +67,7 @@ int websocket_server_data(struct mg_connection * conn, int bits, char *data, siz
return 1; /* return 1 to keep the connetion open */
}
void websocket_server_connection_close(struct mg_connection * conn)
void websocket_server_connection_close(const struct mg_connection * conn)
{
printf("Server: Close connection\n");