Apply Mongoose docs edits by Ev

PUBLISHED_FROM=5cd78790a03580aa23dd3d2d8b825ad449083cc2
This commit is contained in:
Dmitry Frank authored and Cesanta Bot committed 2016-07-26 15:06:04 +00:00
1 parent 4f210cd8eb
commit 849ec1684a
94 files changed
+509 -491

No files matched your search

@@ -7,18 +7,18 @@ signature: |
struct mg_dns_message *msg);
---
Create a DNS reply.
Creates a DNS reply.
The reply will be based on an existing query message `msg`.
The query body will be appended to the output buffer.
"reply + recursion allowed" will be added to the message flags and
"reply + recursion allowed" will be added to the message flags and the
message's num_answers will be set to 0.
Answer records can be appended with `mg_dns_send_reply` or by lower
level function defined in the DNS API.
In order to send the reply use `mg_dns_send_reply`.
It's possible to use a connection's send buffer as reply buffers,
In order to send a reply use `mg_dns_send_reply`.
It's possible to use a connection's send buffer as reply buffer,
and it will work for both UDP and TCP connections.
Example:
@@ -9,10 +9,10 @@ signature: |
size_t rdata_len);
---
Append a DNS reply record to the IO buffer and to the DNS message.
Appends a DNS reply record to the IO buffer and to the DNS message.
The message num_answers field will be incremented. It's caller's duty
to ensure num_answers is propertly initialized.
The message's num_answers field will be incremented. It's the caller's duty
to ensure num_answers is properly initialised.
Returns -1 on error.
+3 -3
View File
@@ -6,12 +6,12 @@ signature: |
void mg_dns_send_reply(struct mg_connection *nc, struct mg_dns_reply *r);
---
Send a DNS reply through a connection.
Sends a DNS reply through a connection.
The DNS data is stored in an IO buffer pointed by reply structure in `r`.
This function mutates the content of that buffer in order to ensure that
the DNS header reflects size and flags of the mssage, that might have been
updated either with `mg_dns_reply_record` or by direct manipulation of
the DNS header reflects the size and flags of the message, that might have
been updated either with `mg_dns_reply_record` or by direct manipulation of
`r->message`.
Once sent, the IO buffer will be trimmed unless the reply IO buffer