mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-27 06:51:04 +08:00
Change mg_ws_send: const char * -> const void *
This commit is contained in:
parent
44a0fa0986
commit
ef9f7d4c16
@ -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);
|
||||
|
@ -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);
|
||||
|
2
src/ws.c
2
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);
|
||||
|
2
src/ws.h
2
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user