Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions host/net@1.0.0.wit
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,11 @@ interface host {

/// Bind a TCP listener for inbound connections.
///
/// `"0.0.0.0"` / `"::"` exposes the listener to every network
/// interface (server posture) — restrict in `Capsule.toml
/// [capabilities] net_tcp_bind` to loopback-only patterns unless
/// the capsule genuinely needs to serve. Port `0` selects an
/// ephemeral port. Gated by a `net_tcp_bind` capability allowlist
/// distinct from `net_connect`.
/// Astrid confines TCP listeners to loopback hosts: `localhost`,
/// `127.0.0.0/8`, or `::1`. Wildcard and non-loopback interfaces are
/// rejected. Port `0` selects an ephemeral port. The requested
/// `host:port` must match the capsule's `[capabilities].net_bind`
/// allowlist; this authority is distinct from `net_connect`.
Comment on lines +340 to +344
bind-tcp: func(host: string, port: u16) -> result<tcp-listener, error-code>;

/// Open an outbound TCP connection to `host:port`. Goes through
Expand Down
Loading