From ef9f7d4c168a96004d49ccdbfddcec6280576884 Mon Sep 17 00:00:00 2001 From: cpq Date: Thu, 11 Aug 2022 12:11:12 +0100 Subject: [PATCH] Change mg_ws_send: const char * -> const void * --- mongoose.c | 2 +- mongoose.h | 2 +- src/ws.c | 2 +- src/ws.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mongoose.c b/mongoose.c index 0de77aa3..34942341 100644 --- a/mongoose.c +++ b/mongoose.c @@ -5819,7 +5819,7 @@ static void mg_ws_mask(struct mg_connection *c, size_t len) { } } -size_t mg_ws_send(struct mg_connection *c, const char *buf, size_t len, +size_t mg_ws_send(struct mg_connection *c, const void *buf, size_t len, int op) { uint8_t header[14]; size_t header_len = mkhdr(len, op, c->is_client, header); diff --git a/mongoose.h b/mongoose.h index fdeb25d9..41eb1f8d 100644 --- a/mongoose.h +++ b/mongoose.h @@ -1259,7 +1259,7 @@ struct mg_connection *mg_ws_connect(struct mg_mgr *, const char *url, const char *fmt, ...); void mg_ws_upgrade(struct mg_connection *, struct mg_http_message *, const char *fmt, ...); -size_t mg_ws_send(struct mg_connection *, const char *buf, size_t len, int op); +size_t mg_ws_send(struct mg_connection *, const void *buf, size_t len, int op); size_t mg_ws_wrap(struct mg_connection *, size_t len, int op); size_t mg_ws_printf(struct mg_connection *c, int op, const char *fmt, ...); size_t mg_ws_vprintf(struct mg_connection *c, int op, const char *fmt, va_list); diff --git a/src/ws.c b/src/ws.c index 227ad694..fbf97750 100644 --- a/src/ws.c +++ b/src/ws.c @@ -129,7 +129,7 @@ static void mg_ws_mask(struct mg_connection *c, size_t len) { } } -size_t mg_ws_send(struct mg_connection *c, const char *buf, size_t len, +size_t mg_ws_send(struct mg_connection *c, const void *buf, size_t len, int op) { uint8_t header[14]; size_t header_len = mkhdr(len, op, c->is_client, header); diff --git a/src/ws.h b/src/ws.h index 628723e5..244889ee 100644 --- a/src/ws.h +++ b/src/ws.h @@ -19,7 +19,7 @@ struct mg_connection *mg_ws_connect(struct mg_mgr *, const char *url, const char *fmt, ...); void mg_ws_upgrade(struct mg_connection *, struct mg_http_message *, const char *fmt, ...); -size_t mg_ws_send(struct mg_connection *, const char *buf, size_t len, int op); +size_t mg_ws_send(struct mg_connection *, const void *buf, size_t len, int op); size_t mg_ws_wrap(struct mg_connection *, size_t len, int op); size_t mg_ws_printf(struct mg_connection *c, int op, const char *fmt, ...); size_t mg_ws_vprintf(struct mg_connection *c, int op, const char *fmt, va_list);