blob: eb69823857776199df1b8a28f59edf7e4cbc766b [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.net.reachability
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 8</span></div>
## **PROTOCOLS**
## Monitor {#Monitor}
*Defined in [fuchsia.net.reachability/reachability.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.reachability/reachability.fidl;l=9)*
<p>Provides snapshots of reachability state.</p>
### SetOptions {#Monitor.SetOptions}
<p>Controls verbosity of results returned from calls to <a class='link' href='#Watch'>Watch</a>. If
options are set via this method, it must be in the first call made
over the channel.</p>
<p>Calling this method after either it or <a class='link' href='#Watch'>Watch</a> have already been
invoked will result in closing the channel. If this method is not
called before calling <a class='link' href='#Watch'>Watch</a>, <a class='link' href='#Snapshot'>Snapshot</a> responses will not be
modified.</p>
#### Request {#Monitor.SetOptions_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>payload</code></td>
<td>
<code><a class='link' href='#MonitorOptions'>MonitorOptions</a></code>
</td>
</tr>
</table>
### Watch {#Monitor.Watch}
<p>Hanging-get API for changes in network reachability state.</p>
<p><code>Watch</code> returns a snapshot of the system's most recent reachability
state information. The first call returns a current snapshot.
Subsequent calls to <code>Watch</code> block until the previously-observed state
changes.</p>
<p>While this API guarantees that any state returned was a valid network
state at some point, it does not guarantee observation of every
intermediate state.</p>
<p>It is not valid to call <code>Watch</code> concurrently. Calling <code>Watch</code> while
another call over the same server end is in flight will result in the
closing the channel.</p>
<ul>
<li>response a snapshot of current system reachability state.</li>
</ul>
#### Request {#Monitor.Watch_Request}
&lt;EMPTY&gt;
#### Response {#Monitor.Watch_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>payload</code></td>
<td>
<code><a class='link' href='#Snapshot'>Snapshot</a></code>
</td>
</tr>
</table>
## **TABLES**
### MonitorOptions {#MonitorOptions data-text="MonitorOptions"}
*Defined in [fuchsia.net.reachability/reachability.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.reachability/reachability.fidl;l=21)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
</table>
### Snapshot {#Snapshot data-text="Snapshot"}
*Defined in [fuchsia.net.reachability/reachability.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.reachability/reachability.fidl;l=44)*
<p>Information about network configuration and apparent reachability status
of external networks.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Snapshot.internet_available">
<td><h3 id="Snapshot.internet_available" class="add-link hide-from-toc">1</h3></td>
<td><code>internet_available</code></td>
<td>
<code>bool</code>
</td>
<td><p>Signifies whether internet reachability is available.</p>
</td>
</tr>
</table>