class ResourceRenewer

Defined at line 41 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.h

|ResourceRenewer| requests resources by sending queries repeatedly. This capability can be used

to renew a received resource (using the |Renew| method) or for general querying (using the

|Query| method). When renewing a received resource, queries are sent at 80%, 85%, 90% and 95%

of the resource's TTL.

If a resource is received, the renewer forgets about the resource until asked again to renew it.

If the resource is not received after the complete query sequence, |ResourceRenewer| sends a

resource record to all the agents with a TTL of zero, signalling that the resource should be

deleted and forgets about the resource. If a resource is explicitly deleted (a resource

record arrives with TTL 0), |ResourceRenewer| will stop querying for it.

Agents that need a resource record renewed call |Renew| on the host, which

then calls |Renew| on the |ResourceRenewer|. Agents must continue to renew

incoming resources as long as they want renewals to occur. When an agent

loses interest in a record, it should simply stop renewing the incoming

resource records. This approach will cause some unneeded renewals, but avoids

difficult cleanup issues associated with a persistent renewal scheme.

Public Methods

void ResourceRenewer (MdnsAgent::Owner * owner)

Defined at line 31 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.cc

void ~ResourceRenewer ()

Defined at line 33 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.cc

void Renew (const DnsResource & resource, Media media, IpVersions ip_versions)

Attempts to renew |resource| before its TTL expires.

Defined at line 35 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.cc

void Query (DnsType type, const DnsName & name, Media media, IpVersions ip_versions, zx::time initial_query_time, zx::duration interval, uint32_t interval_multiplier, uint32_t max_queries, bool request_unicast_response)

Queries for the indicated resource with the specified schedule.

Defined at line 43 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.cc

void ReceiveResource (const DnsResource & resource, MdnsResourceSection section, ReplyAddress sender_address)

MdnsAgent overrides.

Defined at line 68 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.cc

void Quit ()

Defined at line 83 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.cc

void ResourceRenewer (const ResourceRenewer & )

Disallow copy, assign and move.

Defined at line 145 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.h

void ResourceRenewer (ResourceRenewer && )

Defined at line 146 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.h

ResourceRenewer & operator= (const ResourceRenewer & )

Defined at line 147 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.h

ResourceRenewer & operator= (ResourceRenewer && )

Defined at line 148 of file ../../src/connectivity/network/mdns/service/agents/resource_renewer.h