pub struct DnsServerWatcherProxy { /* private fields */ }
Implementations§
Source§impl DnsServerWatcherProxy
impl DnsServerWatcherProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.netpol.socketproxy/DnsServerWatcher.
Sourcepub fn take_event_stream(&self) -> DnsServerWatcherEventStream
pub fn take_event_stream(&self) -> DnsServerWatcherEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn watch_servers(
&self,
) -> QueryResponseFut<Vec<DnsServerList>, DefaultFuchsiaResourceDialect>
pub fn watch_servers( &self, ) -> QueryResponseFut<Vec<DnsServerList>, DefaultFuchsiaResourceDialect>
Returns a list of DNS servers registered with the socketproxy.
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.
Sourcepub fn check_presence(
&self,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn check_presence( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
No-op method that allows checking for presence.
TODO(https://fxbug.dev/296283299): It’s not currently possible for a client with an optionally-provided protocol to check whether there’s someone on the other end without making a FIDL call . This method provides a workaround by giving a client a method that it can call to check for liveness.
Trait Implementations§
Source§impl Clone for DnsServerWatcherProxy
impl Clone for DnsServerWatcherProxy
Source§fn clone(&self) -> DnsServerWatcherProxy
fn clone(&self) -> DnsServerWatcherProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DnsServerWatcherProxy
impl Debug for DnsServerWatcherProxy
Source§impl DnsServerWatcherProxyInterface for DnsServerWatcherProxy
impl DnsServerWatcherProxyInterface for DnsServerWatcherProxy
type WatchServersResponseFut = QueryResponseFut<Vec<DnsServerList>>
type CheckPresenceResponseFut = QueryResponseFut<()>
fn watch_servers(&self) -> Self::WatchServersResponseFut
fn check_presence(&self) -> Self::CheckPresenceResponseFut
Source§impl Proxy for DnsServerWatcherProxy
impl Proxy for DnsServerWatcherProxy
Source§type Protocol = DnsServerWatcherMarker
type Protocol = DnsServerWatcherMarker
Proxy
controls.