mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
ff932b411d
Currently all async ops are polled lazily, which means that op initialization code is postponed until control is yielded to the event loop. This has some weird consequences, e.g. ```js let listener = Deno.listen(...); let conn_promise = listener.accept(); listener.close(); // `BadResource` is thrown. A reasonable error would be `Interrupted`. let conn = await conn_promise; ``` JavaScript promises are expected to be eagerly evaluated. This patch makes ops actually do that. |
||
---|---|---|
.. | ||
01_net.js | ||
02_tls.js | ||
04_net_unstable.js | ||
Cargo.toml | ||
io.rs | ||
lib.deno_net.d.ts | ||
lib.rs | ||
ops.rs | ||
ops_tls.rs | ||
ops_unix.rs | ||
README.md | ||
resolve_addr.rs |
deno_net
This crate implements networking APIs.
This crate depends on following extensions:
- "deno_web"
- "deno_fetch"
Following ops are provided:
- "op_net_read_async"
- "op_net_write_async"
- "op_net_shutdown"
- "op_accept"
- "op_connect"
- "op_listen"
- "op_datagram_receive"
- "op_datagram_send"
- "op_dns_resolve"
- "op_start_tls"
- "op_connect_tls"
- "op_listen_tls"
- "op_accept_tls"
- "op_http_start"
- "op_http_request_next"
- "op_http_request_read"
- "op_http_response"
- "op_http_response_write"
- "op_http_response_close"