Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: net/dns/mdns_client.h

Issue 87693002: Refactored to make MDnsSocketFactory return array of sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/utility/local_discovery/service_discovery_message_handler.cc ('k') | net/dns/mdns_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/mdns_client.h
diff --git a/net/dns/mdns_client.h b/net/dns/mdns_client.h
index 71006d69b0110df80e14969b262c4136aaadd56a..b4a1bc671dd11c735ca47de6bf9a0668f3be345e 100644
--- a/net/dns/mdns_client.h
+++ b/net/dns/mdns_client.h
@@ -16,6 +16,7 @@
namespace net {
+class DatagramServerSocket;
class RecordParsed;
// Represents a one-time record lookup. A transaction takes one
@@ -120,6 +121,15 @@ class NET_EXPORT MDnsListener {
virtual uint16 GetType() const = 0;
};
+// Creates bound datagram sockets ready to use by MDnsClient.
+class NET_EXPORT MDnsSocketFactory {
+ public:
+ virtual ~MDnsSocketFactory() {}
+ virtual void CreateSockets(ScopedVector<DatagramServerSocket>* sockets) = 0;
+
+ static scoped_ptr<MDnsSocketFactory> CreateDefault();
+};
+
// Listens for Multicast DNS on the local network. You can access information
// regarding multicast DNS either by creating an |MDnsListener| to be notified
// of new records, or by creating an |MDnsTransaction| to look up the value of a
@@ -144,7 +154,7 @@ class NET_EXPORT MDnsClient {
int flags,
const MDnsTransaction::ResultCallback& callback) = 0;
- virtual bool StartListening() = 0;
+ virtual bool StartListening(MDnsSocketFactory* factory) = 0;
// Do not call this inside callbacks from related MDnsListener and
// MDnsTransaction objects.
« no previous file with comments | « chrome/utility/local_discovery/service_discovery_message_handler.cc ('k') | net/dns/mdns_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698