Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
e2330944
Commit
e2330944
authored
Jul 22, 2016
by
Evelyn
Committed by
GitHub
Jul 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update mg_send_http_chunk.md
parent
1c18906d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
mg_send_http_chunk.md
docs/c-api/http.h/mg_send_http_chunk.md
+6
-6
No files found.
docs/c-api/http.h/mg_send_http_chunk.md
View file @
e2330944
...
@@ -6,16 +6,16 @@ signature: |
...
@@ -6,16 +6,16 @@ signature: |
void mg_send_http_chunk(struct mg_connection *nc, const char *buf, size_t len);
void mg_send_http_chunk(struct mg_connection *nc, const char *buf, size_t len);
---
---
Send buffer
`buf`
of size
`len`
to the client using chunked HTTP encoding.
Send
s
buffer
`buf`
of size
`len`
to the client using chunked HTTP encoding.
This function
first sends buffer size as hex number + newline
, then
This function
sends the buffer size as hex number + newline first
, then
buffer itself, then
newline. For example,
the buffer itself, then the
newline. For example,
`mg_send_http_chunk(nc, "foo", 3)`
whill append
`3\r\nfoo\r\n`
string to
`mg_send_http_chunk(nc, "foo", 3)`
whill append
the
`3\r\nfoo\r\n`
string to
the
`nc->send_mbuf`
output IO buffer.
the
`nc->send_mbuf`
output IO buffer.
NOTE: HTTP header "Transfer-Encoding: chunked" should be sent prior to
NOTE:
The
HTTP header "Transfer-Encoding: chunked" should be sent prior to
using this function.
using this function.
NOTE: do not forget to send empty chunk at the end of the response,
NOTE: do not forget to send
an
empty chunk at the end of the response,
to tell the client that everything was sent. Example:
to tell the client that everything was sent. Example:
```
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment