---
title: "port_unbridge()"
description: "The port_unbridge() function terminates the connection to a remote network, effectively disconnecting from it."
url: "https://wasix.org/docs/api-reference/wasix/port_unbridge/"
markdown: "https://wasix.org/docs/api-reference/wasix/port_unbridge.md"
---

# `port_unbridge()`

Disconnects from a remote network.

## Description

The `port_unbridge()` function terminates the connection to a remote network, effectively disconnecting from it.

## Syntax

```ebnf
  ;;; Disconnects from a remote network
  (@interface func (export "port_unbridge")
    (result $error (expected (error $errno)))
  )
```

## Parameters

- `ctx`: A mutable reference to the function environment.

## Return Value

The function returns a `Result` indicating the outcome of the operation. If the operation is successful, `Ok(Errno::Success)` is returned. If an error occurs, an appropriate `WasiError` is returned.

## Notes

- The `port_unbridge()` function terminates the connection to a remote network, effectively disconnecting from it.
- After calling this function, further communication with the remote network will not be possible unless a new connection is established.
- The behavior and limitations of the `port_unbridge()` function may vary depending on the specific runtime environment and underlying networking implementation. It is important to consult the documentation or specifications of the specific environment to understand its behavior in that context.

---

[Documentation index](https://wasix.org/llms.txt) · [HTML version](https://wasix.org/docs/api-reference/wasix/port_unbridge/)
