mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 11:09:01 +08:00
API doc synced
This commit is contained in:
parent
51f0cc2b67
commit
02937f8852
11
docs/API.md
11
docs/API.md
@ -124,13 +124,8 @@ context of the IO thread.
|
||||
void mg_printf_data(struct mg_connection *, const char *format, ...);
|
||||
|
||||
These functions are used to construct a response to the client. HTTP response
|
||||
consists of three parts:
|
||||
|
||||
* a status line
|
||||
* zero or more HTTP headers
|
||||
* response body
|
||||
|
||||
Mongoose provides functions for all three parts:
|
||||
consists of three parts: a status line, zero or more HTTP headers,
|
||||
a response body. Mongoose provides functions for all three parts:
|
||||
* `mg_send_status()` is used to create status line. This function can be
|
||||
called zero or once. If `mg_send_status()` is not called, then Mongoose
|
||||
will send status 200 (success) implicitly.
|
||||
@ -141,6 +136,8 @@ Mongoose provides functions for all three parts:
|
||||
implicitly, and sends data in chunks. Therefore, it is not necessary to
|
||||
set `Content-Length` header.
|
||||
|
||||
<!-- -->
|
||||
|
||||
int mg_websocket_write(struct mg_connection* conn, int opcode,
|
||||
const char *data, size_t data_len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user