class Mdns
Defined at line 38 of file ../../src/connectivity/network/mdns/service/mdns.h
Implements mDNS.
Public Methods
void Mdns (Transceiver & transceiver)
|transceiver| must live as long as this |Mdns| object.
Defined at line 33 of file ../../src/connectivity/network/mdns/service/mdns.cc
void ~Mdns ()
Defined at line 36 of file ../../src/connectivity/network/mdns/service/mdns.cc
void SetVerbose (bool verbose)
Determines whether message traffic will be logged.
Defined at line 38 of file ../../src/connectivity/network/mdns/service/mdns.cc
void Start (fuchsia::net::interfaces::WatcherPtr,const DnsName &local_host_name,boolperform_address_probe,fit::closureready_callback,std::vector<DnsName>alt_services)
Starts the transceiver. |ready_callback| is called once we're is ready for
calls to |ResolveHostName|, |SubscribeToService| and
|PublishServiceInstance|.
Defined at line 44 of file ../../src/connectivity/network/mdns/service/mdns.cc
void Stop ()
Stops the transceiver.
Defined at line 147 of file ../../src/connectivity/network/mdns/service/mdns.cc
void ResolveHostName (const DnsName &host_name,zx::durationtimeout,Mediamedia,IpVersionsip_versions,boolinclude_local,boolinclude_local_proxies,ResolveHostNameCallbackcallback)
Resolves |host_name| to |IpAddress|es. Must not be called before |Start|'s ready callback is
called.
Defined at line 155 of file ../../src/connectivity/network/mdns/service/mdns.cc
void SubscribeToHostName (const DnsName &host_name,Mediamedia,IpVersionsip_versions,boolinclude_local,boolinclude_local_proxies,HostNameSubscriber *subscriber)
Subscribes to the specified host name. Must not be called before
|Start|'s ready callback is called. The subscription is cancelled when
the subscriber is deleted or its |Unsubscribe| method is called.
Multiple subscriptions may be created for a given host name.
Defined at line 168 of file ../../src/connectivity/network/mdns/service/mdns.cc
void ResolveServiceInstance (const DnsName &service,const DnsLabel &instance,zx::timetimeout,Mediamedia,IpVersionsip_versions,boolinclude_local,boolinclude_local_proxies,ResolveServiceInstanceCallbackcallback)
Resolves |service+instance| to a node, i.e sends an SRV query and gets
a valid response if the service instance exists/is active.
Defined at line 198 of file ../../src/connectivity/network/mdns/service/mdns.cc
void SubscribeToService (const DnsName &service_name,Mediamedia,IpVersionsip_versions,boolinclude_local,boolinclude_local_proxies,Subscriber *subscriber)
Subscribes to the specified service. The subscription is cancelled when
the subscriber is deleted or its |Unsubscribe| method is called.
Multiple subscriptions may be created for a given service name. Must not be
called before |Start|'s ready callback is called.
Defined at line 212 of file ../../src/connectivity/network/mdns/service/mdns.cc
void SubscribeToAllServices (Mediamedia,IpVersionsip_versions,boolinclude_local,boolinclude_local_proxies,Subscriber *subscriber)
Subscribes to all services. The subscription is cancelled when the subscriber is deleted or its
|Unsubscribe| method is called. Multiple subscriptions may be created for a all services. Must
not be called before |Start|'s ready callback is called.
Defined at line 243 of file ../../src/connectivity/network/mdns/service/mdns.cc
DnsName local_host_name ()
Returns the local host name currently in use. May be different than the host name
passed in to |Start| if address probing detected conflicts.
Defined at line 265 of file ../../src/connectivity/network/mdns/service/mdns.h
bool PublishServiceInstance (DnsNamehost_name,std::vector<inet::IpAddress>addresses,DnsNameservice_name,DnsLabelinstance_name,Mediamedia,IpVersionsip_versions,boolperform_probe,Publisher *publisher)
Publishes a service instance for a host identified by |host_name| and |addresses|. Returns
false if and only if the instance was already published locally. The instance is unpublished
when the publisher is deleted or its |Unpublish| method is called. Must not be called before
|Start|'s ready callback is called.
Defined at line 272 of file ../../src/connectivity/network/mdns/service/mdns.cc
bool PublishServiceInstance (DnsNameservice_name,DnsLabelinstance_name,Mediamedia,IpVersionsip_versions,boolperform_probe,Publisher *publisher)
Publishes a service instance. Returns false if and only if the instance was
already published locally. The instance is unpublished when the publisher
is deleted or its |Unpublish| method is called. Must not be called before
|Start|'s ready callback is called.
Defined at line 304 of file ../../src/connectivity/network/mdns/service/mdns.h
bool PublishHost (DnsNamehost_name,std::vector<inet::IpAddress>addresses,Mediamedia,IpVersionsip_versions,boolperform_probe,HostPublisher *publisher)
Publishes a host. Returns false if and only if the host was already published locally. The
host is unpublished when the publisher is deleted or its |Unpublish| method is called. Must
not be called for |Start|'s ready callback is called.
Defined at line 349 of file ../../src/connectivity/network/mdns/service/mdns.cc
void LogTraffic ()
Writes log messages describing lifetime traffic.
Defined at line 408 of file ../../src/connectivity/network/mdns/service/mdns.cc
void Mdns (const Mdns & )
Disallow copy, assign and move.
Defined at line 569 of file ../../src/connectivity/network/mdns/service/mdns.h
void Mdns (Mdns && )
Defined at line 570 of file ../../src/connectivity/network/mdns/service/mdns.h
Mdns & operator= (const Mdns & )
Defined at line 571 of file ../../src/connectivity/network/mdns/service/mdns.h
Mdns & operator= (Mdns && )
Defined at line 572 of file ../../src/connectivity/network/mdns/service/mdns.h