mDNS peer acting as a resolver (collects unsolicited announcements).
More...
|
| | MdnsResolver () |
| | construct the resolver instance.
|
| |
| void | onQuery (const DnsPacket &query) override |
| | handle a mDNS query (ignored by the resolver).
|
| |
| void | onAnnouncement (const DnsPacket &packet) override |
| | handle a mDNS announcement by storing received records.
|
| |
| bool | waitForRecord (uint16_t type, std::chrono::milliseconds timeout=1000ms) |
| | wait until a record of the given type is received or timeout expires.
|
| |
|
| static const std::string | _iface = "veth1" |
| | network interface to use.
|
| |
mDNS peer acting as a resolver (collects unsolicited announcements).
◆ MdnsResolver()
| MdnsResolver::MdnsResolver |
( |
| ) |
|
|
inline |
construct the resolver instance.
◆ onAnnouncement()
| void MdnsResolver::onAnnouncement |
( |
const DnsPacket & | packet | ) |
|
|
inlineoverride |
handle a mDNS announcement by storing received records.
- Parameters
-
| packet | the mDNS announcement received. |
◆ onQuery()
| void MdnsResolver::onQuery |
( |
const DnsPacket & | query | ) |
|
|
inlineoverride |
handle a mDNS query (ignored by the resolver).
- Parameters
-
| query | the mDNS query received. |
◆ waitForRecord()
| bool MdnsResolver::waitForRecord |
( |
uint16_t | type, |
|
|
std::chrono::milliseconds | timeout = 1000ms ) |
|
inline |
wait until a record of the given type is received or timeout expires.
- Parameters
-
| type | record type to wait for. |
| timeout | maximum time to wait. |
- Returns
- true if the record was received, false on timeout.
◆ _cond
condition variable to signal record reception.
◆ _iface
| const std::string MdnsResolver::_iface = "veth1" |
|
static |
network interface to use.
◆ _mutex
| Mutex MdnsResolver::_mutex |
◆ _received
records received via onAnnouncement.
The documentation for this class was generated from the following file: