@@ -343,7 +343,8 @@ used when using `dgram.Socket` objects with the [`cluster`][] module. When
343343` exclusive ` is set to ` false ` (the default), cluster workers will use the same
344344underlying socket handle allowing connection handling duties to be shared.
345345When ` exclusive ` is ` true ` , however, the handle is not shared and attempted
346- port sharing results in an error.
346+ port sharing results in an error. If creating a ` dgram.Socket ` with ` reusePort `
347+ flag, ` exclusive ` will always be ` true ` when call ` socket.bind() ` with a port.
347348
348349A bound datagram socket keeps the Node.js process running to receive
349350datagram messages.
@@ -916,6 +917,9 @@ chained.
916917<!-- YAML
917918added: v0.11.13
918919changes:
920+ - version: REPLACEME
921+ pr-url: https://github.com/nodejs/node/pull/55403
922+ description: The `reusePort` option is supported.
919923 - version: v15.8.0
920924 pr-url: https://github.com/nodejs/node/pull/37026
921925 description: AbortSignal support was added.
@@ -935,7 +939,15 @@ changes:
935939 * ` type ` {string} The family of socket. Must be either ` 'udp4' ` or ` 'udp6' ` .
936940 Required.
937941 * ` reuseAddr ` {boolean} When ` true ` [ ` socket.bind() ` ] [ ] will reuse the
938- address, even if another process has already bound a socket on it.
942+ address, even if another process has already bound a socket on it, but
943+ only one socket can receive the data.
944+ ** Default:** ` false ` .
945+ * ` reusePort ` {boolean} When ` true ` [ ` socket.bind() ` ] [ ] will reuse the
946+ address, even if another process has already bound a socket on it. Incoming
947+ datagrams are distributed across the receiving sockets. The flag is available
948+ only on some platforms, such as Linux 3.9+, DragonFlyBSD 3.6+, FreeBSD 12.0+,
949+ Solaris 11.4, and AIX 7.2.5+. On unsupported platforms this function will
950+ return an error.
939951 ** Default:** ` false ` .
940952 * ` ipv6Only ` {boolean} Setting ` ipv6Only ` to ` true ` will
941953 disable dual-stack support, i.e., binding to address ` :: ` won't make
0 commit comments