1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
denoland-deno/ext/net
Ian Bull 41a70898ad
refactor(ext): align error messages (#25914)
Aligns the error messages in the ext folder to be in-line with the Deno
style guide.

https://github.com/denoland/deno/issues/25269

<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
2024-10-01 14:26:06 -04:00
..
01_net.js BREAKING(net): remove Deno.[Tls]Listener.prototype.rid (#25556) 2024-09-11 01:14:50 +02:00
02_tls.js refactor(ext): align error messages (#25914) 2024-10-01 14:26:06 -04:00
Cargo.toml chore: forward v1.46.3 release commit to main (#25425) 2024-09-04 17:16:24 +00:00
io.rs chore: enable clippy unused_async rule (#22834) 2024-03-11 23:48:00 -04:00
lib.deno_net.d.ts chore: add code generation for @types/deno (#25545) 2024-09-23 19:18:52 +00:00
lib.rs chore: upgrade deno_core (#25674) 2024-09-17 01:13:34 +00:00
ops.rs BREAKING(ext/net): improved error code accuracy (#25383) 2024-09-27 14:07:20 +00:00
ops_tls.rs BREAKING(ext/net): improved error code accuracy (#25383) 2024-09-27 14:07:20 +00:00
ops_unix.rs refactor(permissions): split up Descriptor into Allow, Deny, and Query (#25508) 2024-09-16 21:39:37 +01:00
raw.rs BREAKING(ext/net): improved error code accuracy (#25383) 2024-09-27 14:07:20 +00:00
README.md docs: Add documentation to a subset of available extensions (#24138) 2024-06-18 00:07:48 +02:00
resolve_addr.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
tcp.rs docs: fix some typos in comments (#23520) 2024-04-30 17:59:56 +10: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_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