mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-14 10:20:01 +00:00
It would be probably good idea to also remove tools/docgen.py and asciidoc.mk, but asciidoc.mk is still mentioned under `cloud/doc`, which may contain some useful info which we'll need at least to review before removing. PUBLISHED_FROM=faf454d4c52a2f07ea8ac084cf0bd11a0c9c9b3b
20 lines
661 B
Markdown
20 lines
661 B
Markdown
---
|
|
title: "mg_set_protocol_dns()"
|
|
decl_name: "mg_set_protocol_dns"
|
|
symbol_kind: "func"
|
|
signature: |
|
|
void mg_set_protocol_dns(struct mg_connection *nc);
|
|
---
|
|
|
|
Attach built-in DNS event handler to the given listening connection.
|
|
|
|
DNS event handler parses incoming UDP packets, treating them as DNS
|
|
requests. If incoming packet gets successfully parsed by the DNS event
|
|
handler, a user event handler will receive `MG_DNS_REQUEST` event, with
|
|
`ev_data` pointing to the parsed `struct mg_dns_message`.
|
|
|
|
See
|
|
[captive_dns_server](https://github.com/cesanta/mongoose/tree/master/examples/captive_dns_server)
|
|
example on how to handle DNS request and send DNS reply.
|
|
|