deno/ext/net
denobot 3da4eca7c1
Some checks are pending
ci / pre-build (push) Waiting to run
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, linux, debug, ubicloud-standard-16-arm) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, linux, release, ubicloud-standard-16-arm, true) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, macos, debug, ${{ github.repository == 'denoland/deno' && startsWith(github.ref, 'refs/tags/') && 'self-hosted' || 'macos-14' }}) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (aarch64, test, macos, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-24.04' || github.reposit… (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, bench, linux, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request' && !contains(github.event.pull_reques… (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, linux, debug, ubuntu-24.04) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, macos, debug, macos-13) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, lint, windows, debug, windows-2022) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, linux, debug, ubuntu-24.04, true) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, linux, release, ${{ github.repository == 'denoland/deno' && 'ubuntu-24.04-xl' || 'ubuntu-24.04' }}, true, ${{ !startsWith(github.ref, 'refs/tags/') }}) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, macos, debug, macos-13) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, macos, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-24.04' || 'macos-13' }}, … (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, windows, debug, windows-2022) (push) Blocked by required conditions
ci / ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }} (x86_64, test, windows, release, ${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (github.event_name == 'pull_request')) && 'ubuntu-24.04' || github.reposi… (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2.1.0 (#26957)
Bumped versions for 2.1.0

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-11-21 03:05:02 +01:00
..
01_net.js
02_tls.js
Cargo.toml 2.1.0 (#26957) 2024-11-21 03:05:02 +01:00
io.rs
lib.deno_net.d.ts
lib.rs
ops_tls.rs feat: permission stack traces in ops (#26938) 2024-11-20 21:24:04 +00:00
ops_unix.rs feat: permission stack traces in ops (#26938) 2024-11-20 21:24:04 +00:00
ops.rs feat: permission stack traces in ops (#26938) 2024-11-20 21:24:04 +00:00
raw.rs
README.md
resolve_addr.rs
tcp.rs

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_ops_and_esm::<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_recv_udp
  • op_net_send_udp
  • 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
  • op_net_accept_tcp
  • op_net_connect_tcp
  • op_net_listen_tcp
  • op_net_listen_udp
  • op_net_connect_tls
  • op_net_listen_tls
  • op_net_accept_tls
  • op_net_accept_unix
  • op_net_connect_unix
  • op_net_listen_unix
  • op_net_listen_unixpacket
  • op_net_recv_unixpacket
  • op_net_send_unixpacket

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
  • op_tls_start
  • op_tls_handshake

Other

  • op_node_unstable_net_listen_udp
  • op_dns_resolve
  • op_dns_resolve
  • op_set_nodelay
  • op_set_keepalive
  • op_node_unstable_net_listen_unixpacket