# NetConnectivityBinding

`import { NetConnectivityBinding } from "destack:net/binding";`

Network connectivity binding family.

```ds title="NetConnectivityBinding"
export interface NetConnectivityBinding {
    read(): Result<NetworkConnectivity, HostError>;
    openWatch(): Result<NetworkWatchHandle, HostError>;
    closeWatch(watch: NetworkWatchHandle): Result<void, HostError>;
    readWatch(watch: NetworkWatchHandle, timeoutNs: uint64): Result<NetworkConnectivityEvent, HostError>;
    tryReadWatch(watch: NetworkWatchHandle): Result<NetworkConnectivityEvent, HostError>;
}
```

[language/library/src/net/binding/connectivity.ds:74:122](https://github.com/destack-sh/destack/blob/main/language/library/src/net/binding/connectivity.ds#L74-L122)

## Members

### `read(): Result<NetworkConnectivity, HostError>`

Read network connectivity.

### `openWatch(): Result<NetworkWatchHandle, HostError>`

Open network connectivity watch stream.

### `closeWatch(watch: NetworkWatchHandle): Result<void, HostError>`

Close network connectivity watch stream.

### `readWatch(watch: NetworkWatchHandle, timeoutNs: uint64): Result<NetworkConnectivityEvent, HostError>`

Wait for one network connectivity event.

### `tryReadWatch(watch: NetworkWatchHandle): Result<NetworkConnectivityEvent, HostError>`

Poll one network connectivity event without blocking.
