mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
873a5ce2ed
This commit adds a `reuseAddress` option for UDP sockets. When this option is enabled, one can listen on an address even though it is already being listened on from a different process or thread. The new socket will steal the address from the existing socket. On Windows and Linux this uses the `SO_REUSEADDR` option, while on other Unixes this is done with `SO_REUSEPORT`. This behavior aligns with what libuv does. TCP sockets still unconditionally set the `SO_REUSEADDR` flag - this behavior matches Node.js and Go. This PR does not change this behaviour. Co-authored-by: Luca Casonato <hello@lcas.dev> |
||
---|---|---|
.. | ||
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_accept"
- "op_net_connect"
- "op_net_listen"
- "op_dgram_recv"
- "op_dgram_send"
- "op_dns_resolve"
- "op_tls_start"
- "op_tls_connect"
- "op_tls_listen"
- "op_tls_accept"
- "op_tls_handshake"