Fix mDNS registration using wrong hostname.

PiperOrigin-RevId: 803100146
This commit is contained in:
Francis Tsui
2025-09-04 11:13:05 -07:00
committed by Copybara-Service
parent a43b20008a
commit ec4cc9338c
6 changed files with 59 additions and 49 deletions
@@ -19,6 +19,7 @@
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
@@ -59,6 +60,9 @@ winrt::guid nearby_uuid_to_winrt_guid(Uuid uuid);
bool is_nearby_uuid_equal_to_winrt_guid(const Uuid& uuid,
const ::winrt::guid& guid);
// Returns the DNS host name of the computer or std::nullopt if it fails.
std::optional<std::wstring> GetDnsHostName();
namespace Constants {
// The Id of the Service Name SDP attribute
const uint16_t SdpServiceNameAttributeId = 0x100;