1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

31 commits

Author SHA1 Message Date
Bartek Iwańczuk
8e3f825c92
Revert "refactor(ext/net): clean up variadic network ops (#16392)" (#16417)
Should fix https://github.com/denoland/deno_std/issues/2807
2022-10-25 20:32:51 +02:00
Luca Casonato
c061538417
refactor(ext/net): clean up variadic network ops (#16392)
Previously `op_net_listen`, `op_net_accept`, and various other ops in
ext/net where variadic on the transport. This created a lot of code
bloat. This commit updates the code to instead have separate ops for
each transport.
2022-10-24 14:55:39 +02:00
Gianluca Oldani
873a5ce2ed
feat(ext/net): add reuseAddress option for UDP (#13849)
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>
2022-10-24 09:05:07 +00:00
Bartek Iwańczuk
212b7dd6da
feat: Add requesting API name to permission prompt (#15936)
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2022-09-27 22:36:33 +02:00
Ben Noordhuis
b1b418b81a
chore: fix clippy warnings (#15944)
Stop allowing clippy::derive-partial-eq-without-eq and fix warnings
about deriving PartialEq without also deriving Eq.

In one case I removed the PartialEq because it a) wasn't necessary,
and b) sketchy because it was comparing floating point numbers.

IMO, that's a good argument for enforcing the lint rule, because it
would most likely have been caught during review if it had been enabled.
2022-09-19 10:25:03 +02:00
Ryan Dahl
684841a18c
upgrade deps (#15914) 2022-09-16 19:11:30 -04:00
Mathias Lafeldt
e96933bc16
chore: use Rust 1.63.0 (#15464) 2022-08-21 19:31:14 +02:00
Bartek Iwańczuk
b8b82c3ea4
chore: use Rust 1.62.0 (#15028) 2022-07-01 15:28:06 +02:00
Craig Morten
10a68a5635
feat(ext/net): add CAA DNS record support in Deno.resolveDns() API (#14624) 2022-05-16 11:20:41 +02:00
Craig Morten
c9e9265c3e
feat(ext/net): support NAPTR records in Deno.resolveDns() API (#14613) 2022-05-15 17:42:02 +02:00
Craig Morten
38e0a2ec1b
feat(ext/net): support full SOA record interface (#14617) 2022-05-15 16:43:08 +02:00
Thanapat Chotipun
bd4256262a
feat(ext/net): add support for SOA records in Deno.resolveDns() API (#14534) 2022-05-14 14:08:35 +02:00
Thanapat Chotipun
e3954df8c5
feat(ext/net): add "NS" record support in Deno.resolveDns API (#14372) 2022-05-03 20:04:20 +02:00
Aaron O'Mullan
bb53135ed8
cleanup(core): OpPair => OpDecl (#13952) 2022-03-15 23:43:17 +01:00
Aaron O'Mullan
88d0f01948
feat(ops): custom arity (#13949)
Also cleanup & drop ignored wildcard op-args
2022-03-14 23:38:53 +01:00
Divy Srivastava
b4e42953e1
feat(core): codegen ops (#13861)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-03-14 18:44:15 +01:00
Gianluca Oldani
7e3496403a
feat(ext/net): Use socket2 crate to create TcpListener (#13808) 2022-03-05 00:43:48 +01:00
Luca Casonato
02c95d367e
chore: make new TCP conn methods unstable (#13686) 2022-02-16 17:32:29 +01:00
Yosi Pramajaya
3e566bb457
feat(ext/net): Add Conn.setNoDelay and Conn.setKeepAlive (#13103) 2022-01-31 16:36:54 +01:00
Ryan Dahl
1fb5858009
chore: update copyright to 2022 (#13306)
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2022-01-07 22:09:52 -05:00
Ben Noordhuis
4d176b7b7c
fix(ext/net): make unix and tcp identical on close (#13075)
std/http/server knows how to handle "Listener has been closed"
exceptions but not "operation canceled" errors.

Make "unix" listen sockets throw the same exception as "tcp" listen
sockets when the socket is closed and has a pending accept operation.

There is still a discrepancy when multiple accept requests are posted
but that's probably a less visible issue and something for another day.

Fixes #13033
2021-12-14 23:27:04 +01:00
Michael Busby
6c09e02304
feat(ext/net): enable sending to broadcast address (#12860)
You can now send UDP datagrams to the broadcast address.
2021-11-29 11:14:46 +01:00
Yury Selivanov
1d3f734e18
feat(ext/net): ALPN support in Deno.connectTls() (#12786) 2021-11-26 19:59:53 +01:00
Aaron O'Mullan
94a81e5e9b
cleanup(ext/net): consistent op names (#12607) 2021-10-30 18:51:42 +02:00
Satya Rohith
29f9e14457
feat: stabilize Deno.resolveDns (#12368) 2021-10-10 15:46:11 +05:30
Satya Rohith
25771b3d9b
feat(ext/net): relevant errors for resolveDns (#12370) 2021-10-10 15:44:45 +05:30
Leo K
77a00ce1fb
chore: various op cleanup (#12329) 2021-10-05 22:38:27 +02:00
Ahab
198f5b9514
fix(ext/net): should not panic when listening to unix abstract address (#12300) 2021-10-02 19:09:59 +02:00
Satya Rohith
3708cbc600
refactor(ext/net): make op_connect & op_connect_tls public (#12150) 2021-09-20 19:35:23 +05:30
Aaron O'Mullan
2ca454b402
refactor(ops): return BadResource errors in ResourceTable calls (#11710)
* refactor(ops): return BadResource errors in ResourceTable calls

Instead of relying on callers to map Options to Results via `.ok_or_else(bad_resource_id)` at over 176 different call sites ...
2021-08-15 13:29:19 +02:00
Ryan Dahl
a0285e2eb8
Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
Renamed from extensions/net/ops.rs (Browse further)