pub enum ClientRequest {
WatchServers {
responder: ClientWatchServersResponder,
},
WatchAddress {
responder: ClientWatchAddressResponder,
},
WatchPrefixes {
responder: ClientWatchPrefixesResponder,
},
Shutdown {
responder: ClientShutdownResponder,
},
}
Expand description
Provides methods to watch for discovered network configurations.
This protocol encodes the underlying object’s lifetime in both directions; the underlying object is alive iff both ends of the protocol are open. That is:
- Closing the client end causes the object to be destroyed.
- Observing a closure of the server end indicates the object no longer exists.
Variants§
WatchServers
Returns a list of DNS servers.
First call always returns a snapshot of the current list of servers or blocks if an empty list would be returned. Subsequent calls will block until the list of servers changes.
The list of servers changes over time by configuration or network topology changes,
expiration, etc. Callers must repeatedly call WatchServers
and replace any previously
returned servers
with new ones to avoid using stale or expired entries.
It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.
- response
servers
The list of servers to use for DNS resolution, in priority order.
Fields
responder: ClientWatchServersResponder
WatchAddress
Returns an address and its parameters.
Yields a value for every address acquired by the client.
It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.
- response
address
the assigned address. - response
address_parameters
the parameters of the address. - response
address_state_provider
provides address assignment state and enables updating address properties; client end is closed if the address becomes invalid (its valid lifetime expires and Renew and Rebind fail).
Fields
responder: ClientWatchAddressResponder
WatchPrefixes
Hanging get for prefix leases.
The first call to this method will return when there is at least one lease to report (the first call is guaranteed to return with a non-empty vector). Subsequent calls will return immediately if there is a change to report, or block until a change occurs.
It is invalid to call this method while a previous call is pending. Doing so will cause the server end of the protocol to be closed.
- response
prefixes
the assigned prefixes and their lifetimes.
Fields
responder: ClientWatchPrefixesResponder
Shutdown
Gracefully tears down the underlying object.
Blocks until any held addresses are gracefully released, as described in RFC 8415, Section 18.2.7.
The server end of the protocol is closed after this method returns.
- error a
zx.Status
if any of the addresses were not gracefully released, e.g. the client times out waiting for Reply to Release, or the interface is down and sending Release fails.
Fields
responder: ClientShutdownResponder
Implementations§
Source§impl ClientRequest
impl ClientRequest
pub fn into_watch_servers(self) -> Option<ClientWatchServersResponder>
pub fn into_watch_address(self) -> Option<ClientWatchAddressResponder>
pub fn into_watch_prefixes(self) -> Option<ClientWatchPrefixesResponder>
pub fn into_shutdown(self) -> Option<ClientShutdownResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL