RAVENNAKIT
Loading...
Searching...
No Matches
dnssd_service_description.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <set>
5#include <string>
6#include <cstdint>
7
8namespace rav::dnssd {
9
11using TxtRecord = std::map<std::string, std::string>;
12
18 std::string fullname;
19
21 std::string name;
22
24 std::string reg_type;
25
27 std::string domain;
28
30 std::string host_target;
31
33 uint16_t port {};
34
37
39 std::map<uint32_t, std::set<std::string>> interfaces; // interfaceIndex, addresses
40
45 [[nodiscard]] bool resolved() const;
46
48 [[nodiscard]] std::string to_string() const noexcept;
49};
50
51} // namespace rav::dnssd
std::map< std::string, std::string > TxtRecord
Simple typedef for representing a TXT record.
A struct containing data which represents a service on the network.
std::string domain
The domain of the service (local.).
bool resolved() const
Returns whether this service has been resolved.
TxtRecord txt
The TXT record of the service, represented as a map of keys and values.
std::string fullname
The full service domain name.
std::string reg_type
The type of the service (ie. _http._tcp.).
std::map< uint32_t, std::set< std::string > > interfaces
The resolved addresses of this service.
std::string name
The name of the service.
std::string host_target
The host target of the service (name.local.).
std::string to_string() const noexcept
Returns a description of this struct, which might be handy for debugging or logging purposes.
uint16_t port
The port of the service (in native endian).