Commit Graph

208 Commits

Author SHA1 Message Date
theanarkh
6a02c2701e
lib: add UV_UDP_REUSEPORT for udp
PR-URL: https://github.com/nodejs/node/pull/55403
Refs: https://github.com/libuv/libuv/pull/4419
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-10-21 10:25:10 +00:00
Aviv Keller
71785889c8
lib: prefer logical assignment
PR-URL: https://github.com/nodejs/node/pull/55044
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2024-10-09 06:42:16 +00:00
Michaël Zasso
d5eb9a378e
lib: remove Symbol[Async]Dispose polyfills
PR-URL: https://github.com/nodejs/node/pull/55276
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-10-07 09:47:44 +00:00
Aviv Keller
574f2dd517
lib: prefer optional chaining
PR-URL: https://github.com/nodejs/node/pull/55045
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2024-09-24 19:48:15 +00:00
Antoine du Hamel
7c58645aca
lib: move Symbol[Async]Dispose polyfills to internal/util
PR-URL: https://github.com/nodejs/node/pull/54853
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-10 21:24:56 +00:00
theanarkh
f05baff6ad
lib: do not call callback if socket is closed
PR-URL: https://github.com/nodejs/node/pull/52829
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-05-23 20:32:25 +00:00
Antoine du Hamel
231548b5cf
lib: enforce ASCII order in error code imports
PR-URL: https://github.com/nodejs/node/pull/52625
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2024-04-23 17:05:38 +00:00
atlowChemi
8362caa7d8 dgram: use internal addAbortListener
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-03-16 09:08:56 +00:00
theanarkh
d405a606ab
lib: return directly if udp socket close before lookup
PR-URL: https://github.com/nodejs/node/pull/51914
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-03-01 19:09:07 +00:00
Aras Abbasi
83e6350b82
errors: improve hideStackFrames
PR-URL: https://github.com/nodejs/node/pull/49990
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-11-11 16:25:08 +00:00
atlowChemi
17f6b8c49c dgram: socket add asyncDispose
PR-URL: https://github.com/nodejs/node/pull/48717
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-07-11 21:10:27 +00:00
atlowChemi
bb031cbe2c
dgram: use addAbortListener
PR-URL: https://github.com/nodejs/node/pull/48550
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-07-11 19:50:22 +03:00
Yagiz Nizipli
5613e223d5 src: return uint32 for guessHandleType
PR-URL: https://github.com/nodejs/node/pull/48349
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2023-06-15 19:21:49 +00:00
Antoine du Hamel
9dbb1623ff
lib: add trailing commas to all public core modules
PR-URL: https://github.com/nodejs/node/pull/46848
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2023-02-28 12:10:24 +01:00
Ramana Venkata
65d2a4247b
dgram: fix unhandled exception aborting a closed udp socket
Fixes: https://github.com/nodejs/node/issues/46750
PR-URL: https://github.com/nodejs/node/pull/46770
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-02-25 10:22:05 +00:00
Antoine du Hamel
fe514bf960
lib: enforce use of trailing commas for functions
PR-URL: https://github.com/nodejs/node/pull/46629
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2023-02-14 18:45:16 +01:00
theanarkh
6d49f46b48
dgram: sync the old handle state to new handle
PR-URL: https://github.com/nodejs/node/pull/46041
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2023-01-03 06:28:08 +00:00
theanarkh
97e8bda5b2
dgram: add dgram send queue info
PR-URL: https://github.com/nodejs/node/pull/44149
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2022-08-17 16:08:58 +00:00
theanarkh
60898eed65
lib: add diagnostics channel and perf hooks detail
PR-URL: https://github.com/nodejs/node/pull/43984
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-07-29 14:27:16 +01:00
Antoine du Hamel
06d8606960
lib: use null-prototype objects for property descriptors
Refs: https://github.com/nodejs/node/pull/42921

PR-URL: https://github.com/nodejs/node/pull/43270
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-06-03 09:23:58 +01:00
Darshan Sen
bc395d4c53
src: properly report exceptions from AddressToJS()
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/42054
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-03-26 15:39:59 +00:00
Rongjian Zhang
5753eb102f
dgram: remove unreachable connectState assign
PR-URL: https://github.com/nodejs/node/pull/38590
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2022-01-20 08:34:52 +00:00
Nitzan Uziely
2413283f55 dgram: fix send with out of bounds offset + length
fix Socket.prototype.send sending garbage when the message is a string,
or Buffer and offset+length is out of bounds.

Fixes: https://github.com/nodejs/node/issues/40491

PR-URL: https://github.com/nodejs/node/pull/40568
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-10-25 13:26:24 +00:00
Voltrex
40c6e838df
dgram: tighten address validation in socket.send
PR-URL: https://github.com/nodejs/node/pull/39190
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-09-18 15:51:00 +02:00
Voltrex
f037d29abe
dgram: use simplified validator
The `dgram` lib module should use the simplified `validatePort()`
validator.

PR-URL: https://github.com/nodejs/node/pull/39753
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-08-15 11:08:47 -07:00
Rongjian Zhang
1b11398628 dgram: extract cluster lazy loading method to make it testable
PR-URL: https://github.com/nodejs/node/pull/38563
Refs: https://coverage.nodejs.org/coverage-26e318a321a872bc/lib/dgram.js.html#L202
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-09 09:16:22 +02:00
Nitzan Uziely
21c8c7e511 dgram: support AbortSignal in createSocket
PR-URL: https://github.com/nodejs/node/pull/37026
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-25 20:36:00 +02:00
ZiJian Liu
08dd4b1723
lib: refactor to use validateString
PR-URL: https://github.com/nodejs/node/pull/37006
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-22 19:56:34 -08:00
Michael Dawson
15164cebce lib,src: update cluster to use Parent
Doc deprecate isMaster and setupMaster in favor
of isPrimary and setupPrimary.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/36478
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-01-05 15:41:45 -05:00
Antoine du Hamel
e074bee7da dgram: refactor to use more primordials
PR-URL: https://github.com/nodejs/node/pull/36286
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-12-04 18:34:22 +00:00
Sarat Addepalli
f0fb511e3b
dgram: allow typed arrays in .send()
PR-URL: https://github.com/nodejs/node/pull/22413
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-06-19 07:40:11 -07:00
James M Snell
b023d61716 lib: move isLegalPort to validators, refactor
isLegalPort was used multiple places in the same way -- to validate
the port and throw if necessary. Moved into internal/validators.

PR-URL: https://github.com/nodejs/node/pull/31851
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-03-05 11:52:53 -08:00
Anna Henningsen
43b7142fed dgram: make UDPWrap more reusable
Allow using the handle more directly for I/O in other parts of
the codebase.

Originally landed in the QUIC repo

Original review metadata:

```
  PR-URL: https://github.com/nodejs/quic/pull/165
  Reviewed-By: James M Snell <jasnell@gmail.com>
  Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
```

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/31871
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-03-03 10:21:19 -08:00
cjihrig
1b2e2944bc
dgram: don't hide implicit bind errors
When dgram socket implicit binding fails, an attempt is made to
clean up the send queue. This was originally implemented using
an 'error' handler that performed cleanup and then emitted a
fake error, which concealed the original error. This was done
to prevent cases where the same error was emitted twice. Now
that the errorMonitor event is available, use that to perform
the cleanup without impacting the actual error handling.

PR-URL: https://github.com/nodejs/node/pull/31958
Refs: https://github.com/nodejs/help/issues/2484
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-02-27 21:01:32 -05:00
A. Volgin
643241ae3f
dgram: test to add and to drop specific membership
Test of addSourceSpecificMembership and dropSourceSpecificMembership
for correct arguments with sourceAddress, groupAddress.

PR-URL: https://github.com/nodejs/node/pull/31047
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-12-25 11:58:29 +01:00
Trivikram Kamat
c68ecee6a9 dgram: use for...of
PR-URL: https://github.com/nodejs/node/pull/30999
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-20 07:35:39 -08:00
Michaël Zasso
141a6e34ee
lib: enforce use of Array from primordials
PR-URL: https://github.com/nodejs/node/pull/30635
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-11-27 19:29:01 +01:00
Michaël Zasso
0646eda4fc
lib: flatten access to primordials
Store all primordials as properties of the primordials object.
Static functions are prefixed by the constructor's name and prototype
methods are prefixed by the constructor's name followed by "Prototype".
For example: primordials.Object.keys becomes primordials.ObjectKeys.

PR-URL: https://github.com/nodejs/node/pull/30610
Refs: https://github.com/nodejs/node/issues/29766
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-11-25 10:28:15 +01:00
Anna Henningsen
115792dfde
dgram: remove listeners on bind error
This avoids piling up `'listening'` event listeners if
`.bind()` fails repeatedly.

Fixes: https://github.com/nodejs/node/issues/30209

PR-URL: https://github.com/nodejs/node/pull/30210
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-11-07 00:55:00 +01:00
Anna Henningsen
99e874e545
dgram: reset bind state before emitting error
This was previously done inconsistently, sometimes before, sometimes
after emitting the event.

PR-URL: https://github.com/nodejs/node/pull/30210
Fixes: https://github.com/nodejs/node/issues/30209
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-11-07 00:54:59 +01:00
Lucas Pardue
1784b7fafa
dgram: add source-specific multicast support
This adds RFC 4607 support for IPv4 and IPv6.

Co-Authored-By: Nicolas Thumann <46975855+n-thumann@users.noreply.github.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/15735
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-17 03:12:53 +02:00
Anna Henningsen
afdc3d0d18 dgram: use uv_udp_try_send()
This improves dgram performance by avoiding unnecessary async
operations.

One issue with this commit is that it seems hard to actually create
conditions under which the fallback path to the async case is
actually taken, for all supported OS, so an internal CLI option
is used for testing that path.

Another caveat is that the lack of an async operation means
that there are slight timing differences (essentially `nextTick()`
rather than `setImmediate()` for the send callback).

PR-URL: https://github.com/nodejs/node/pull/29832
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-10-05 17:48:10 -07:00
Manuel Ochoa Loaiza
e5e96fbc35 dgram: changed 'var' to 'let' and 'const'
PR-URL: https://github.com/nodejs/node/pull/28357
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-29 23:12:18 -07:00
cjihrig
d1dd4e10db
dgram: fix abort on bad args
This commit fixes a C++ abort for connected dgram sockets
by improving input validation in the JS layer.

Fixes: https://github.com/nodejs/node/issues/28126
PR-URL: https://github.com/nodejs/node/pull/28135
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-10 09:14:13 -07:00
Roman Reiss
55b80f9029
tools: enable block-scoped-var eslint rule
PR-URL: https://github.com/nodejs/node/pull/27616
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-10 16:58:49 +02:00
MaleDong
1a54d0fa59 dgram: change 'this' to 'self' for 'isConnected'
The function 'isConnected' is directly called by many 'Socket' instance,
so we shouldn't directly use 'this' because 'this' will be the self of
function itself, and we should use 'self' as the instance of 'Socket'
function.

PR-URL: https://github.com/nodejs/node/pull/27338
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-04-23 21:42:46 -07:00
Joyee Cheung
8d901bb44e
src: move guessHandleType in the util binding
It does not make too much sense to have modules unrelated to TTY
load the TTY binding just to use this method. Put this in the
util binding instead.

PR-URL: https://github.com/nodejs/node/pull/27289
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-20 13:25:41 +08:00
Michaël Zasso
908292cf1f lib: enforce the use of Object from primordials
PR-URL: https://github.com/nodejs/node/pull/27146
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2019-04-12 05:38:45 +02:00
Santiago Gimeno
9e960175d1 dgram: add support for UDP connected sockets
Added the `dgram.connect()` and `dgram.disconnect()` methods that
associate/disassociate a udp socket to/from a remote address.
It optimizes for cases where lots of packets are sent to the same
address.
Also added the `dgram.remoteAddress()` method to retrieve the associated
remote address.

PR-URL: https://github.com/nodejs/node/pull/26871
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-03 06:48:13 +02:00
Ruben Bridgewater
f86f5736da
benchmark,lib: change var to const
Refs: https://github.com/nodejs/node/pull/26679

PR-URL: https://github.com/nodejs/node/pull/26915
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-30 13:16:39 +01:00