diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-03-18 14:18:40 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-03-18 14:38:27 +0000 |
commit | 0078283f3cf586ae8a0d0df501a08e7440636b43 (patch) | |
tree | 9e227bbc71af5611b00176d23bf4f474c09bf54c /chromium/net/dns/mdns_client.h | |
parent | eaf1da4d961fbbda9455f9af3b23d1af777f43fa (diff) |
BASELINE: Update Chromium to 73.0.3683.83
Change-Id: Ie2948cebb1e9204f293fdf63c36d6215a5f5b507
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/net/dns/mdns_client.h')
-rw-r--r-- | chromium/net/dns/mdns_client.h | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/chromium/net/dns/mdns_client.h b/chromium/net/dns/mdns_client.h index 3cba46b4ea7..89011cc25b8 100644 --- a/chromium/net/dns/mdns_client.h +++ b/chromium/net/dns/mdns_client.h @@ -22,14 +22,9 @@ namespace net { class DatagramServerSocket; -class DatagramClientSocket; class NetLog; class RecordParsed; -typedef std::pair<std::unique_ptr<DatagramClientSocket>, - std::unique_ptr<DatagramServerSocket>> - MDnsSendRecvSocketPair; - // Represents a one-time record lookup. A transaction takes one // associated callback (see |MDnsClient::CreateTransaction|) and calls it // whenever a matching record has been found, either from the cache or @@ -145,8 +140,8 @@ class NET_EXPORT MDnsListener { class NET_EXPORT MDnsSocketFactory { public: virtual ~MDnsSocketFactory() {} - virtual void CreateSocketPairs( - std::vector<MDnsSendRecvSocketPair>* socket_pairs) = 0; + virtual void CreateSockets( + std::vector<std::unique_ptr<DatagramServerSocket>>* sockets) = 0; static std::unique_ptr<MDnsSocketFactory> CreateDefault(); }; @@ -186,19 +181,31 @@ class NET_EXPORT MDnsClient { static std::unique_ptr<MDnsClient> CreateDefault(); }; +// Gets the endpoint for the multicast group a socket should join to receive +// MDNS messages. Such sockets should also bind to the endpoint from +// GetMDnsReceiveEndPoint(). +// +// This is also the endpoint messages should be sent to to send MDNS messages. +NET_EXPORT IPEndPoint GetMDnsGroupEndPoint(AddressFamily address_family); + +// Gets the endpoint sockets should be bound to to receive MDNS messages. Such +// sockets should also join the multicast group from GetMDnsGroupEndPoint(). +NET_EXPORT IPEndPoint GetMDnsReceiveEndPoint(AddressFamily address_family); + typedef std::vector<std::pair<uint32_t, AddressFamily>> InterfaceIndexFamilyList; // Returns pairs of interface and address family to bind. Current // implementation returns unique list of all available interfaces. NET_EXPORT InterfaceIndexFamilyList GetMDnsInterfacesToBind(); -// Creates a pair of sockets for sending and receiving, binds them to mDNS -// endpoints, and sets their multicast interfaces and joins the multicast group -// on for |interface_index|. Returns NULL if failed. -NET_EXPORT MDnsSendRecvSocketPair -CreateAndBindMDnsSocketPair(AddressFamily address_family, - uint32_t interface_index, - NetLog* net_log); +// Create sockets, binds socket to MDns endpoint, and sets multicast interface +// and joins multicast group on for |interface_index|. +// Returns NULL if failed. +NET_EXPORT std::unique_ptr<DatagramServerSocket> CreateAndBindMDnsSocket( + AddressFamily address_family, + uint32_t interface_index, + NetLog* net_log); + } // namespace net #endif // NET_DNS_MDNS_CLIENT_H_ |