deno/ext/net
snek 4772778107
Some checks are pending
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
refactor: http upgrade internals (#30612)
clean up some outdated code and implement a few performance
improvements. most notably, the response from `upgradeWebSocket` is now
actually used as a normal response.

a followup pr will rework raw upgrades to a greater extent
2025-09-19 09:33:32 +02:00
..
01_net.js feat: add tcpBacklog arg to Deno.listen{Tls} and Deno.serve (#30541) 2025-08-28 09:43:20 +02:00
02_tls.js feat: add tcpBacklog arg to Deno.listen{Tls} and Deno.serve (#30541) 2025-08-28 09:43:20 +02:00
03_quic.js fix(unstable): make QuicListener yield QuicIncoming (#30150) 2025-09-05 19:44:44 +02:00
Cargo.toml 2.5.1 (#30753) 2025-09-17 01:58:00 +02:00
io.rs fix: android build (#30360) 2025-08-12 15:47:18 +02:00
lib.rs refactor(permissions): push down special file checking to permissions container (#30005) 2025-07-09 20:50:26 +00:00
ops.rs chore: upgrade hickory-dns to 0.25.2 (#30582) 2025-09-08 23:11:23 +02:00
ops_tls.rs refactor: http upgrade internals (#30612) 2025-09-19 09:33:32 +02:00
ops_unix.rs chore: Rust 1.89.0 (#30364) 2025-08-09 11:11:48 +00:00
quic.rs feat: V8 14.0.0 (#30629) 2025-09-08 22:12:54 +02:00
raw.rs refactor: http upgrade internals (#30612) 2025-09-19 09:33:32 +02:00
README.md chore: remove redundant operations from README.md (#30228) 2025-07-28 14:41:49 -04:00
resolve_addr.rs chore: update to edition 2024 (#29923) 2025-07-02 17:59:39 -07:00
tcp.rs feat: add tcpBacklog arg to Deno.listen{Tls} and Deno.serve (#30541) 2025-08-28 09:43:20 +02:00
tunnel.rs chore: Rust 1.89.0 (#30364) 2025-08-09 11:11:48 +00:00

deno_net

This crate implements networking APIs.

Usage Example

From javascript, include the extension's source:

import * as webidl from "ext:deno_webidl/00_webidl.js";
import * as net from "ext:deno_net/01_net.js";
import * as tls from "ext:deno_net/02_tls.js";

Then from rust, provide: deno_net::deno_net::init::<Permissions>(root_cert_store_provider, unsafely_ignore_certificate_errors)

Where:

  • root_cert_store_provider: Option<Arc<dyn RootCertStoreProvider>>
  • unsafely_ignore_certificate_errors: Option<Vec<String>>
  • Permissions: A struct implementing deno_net::NetPermissions

In the extensions field of your RuntimeOptions

Dependencies

  • deno_web: Provided by the deno_web crate
  • deno_fetch: Provided by the deno_fetch crate

Provided ops

Following ops are provided, which can be accessed through Deno.ops:

Net

  • op_net_accept_tcp
  • op_net_accept_unix
  • op_net_connect_tcp
  • op_net_connect_unix
  • op_net_listen_tcp
  • op_net_listen_udp
  • op_net_listen_unix
  • op_net_listen_unixpacket
  • op_net_recv_udp
  • op_net_recv_unixpacket
  • op_net_send_udp
  • op_net_send_unixpacket
  • op_net_connect_tls
  • op_net_listen_tls
  • op_net_accept_tls
  • op_net_join_multi_v4_udp
  • op_net_join_multi_v6_udp
  • op_net_leave_multi_v4_udp
  • op_net_leave_multi_v6_udp
  • op_net_set_multi_loopback_udp
  • op_net_set_multi_ttl_udp

TLS

  • op_tls_start
  • op_tls_handshake
  • op_tls_key_null
  • op_tls_key_static
  • op_tls_key_static_from_file
  • op_tls_cert_resolver_create
  • op_tls_cert_resolver_poll
  • op_tls_cert_resolver_resolve
  • op_tls_cert_resolver_resolve_error

Other

  • op_node_unstable_net_listen_udp
  • op_dns_resolve
  • op_set_nodelay
  • op_set_keepalive
  • op_node_unstable_net_listen_unixpacket