mongoose/docs/c-api/dns_server.h/mg_dns_send_reply.md
Sergey Lyubka 12437fd7fe Refactor Mongoose documentation
PUBLISHED_FROM=e9a4e5c7b4a1d03b93a2a79e29de19e60e919929
2016-09-01 14:35:02 +00:00

673 B

title decl_name symbol_kind signature
mg_dns_send_reply() mg_dns_send_reply func void mg_dns_send_reply(struct mg_connection *nc, struct mg_dns_reply *r);

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 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 is the connection's send buffer and the connection is not in UDP mode.