Skip to content

Commit 9e2c782

Browse files
committed
dgram: mark socket* methods end-of-life
1 parent dd205c9 commit 9e2c782

File tree

2 files changed

+5
-73
lines changed

2 files changed

+5
-73
lines changed

doc/api/deprecations.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2391,12 +2391,15 @@ unavailable when the [permission model][] is enabled.
23912391

23922392
<!-- YAML
23932393
changes:
2394+
- version: REPLACEME
2395+
pr-url: https://github.com/nodejs/node/pull/58520
2396+
description: End-of-Life.
23942397
- version: v11.0.0
23952398
pr-url: https://github.com/nodejs/node/pull/22011
23962399
description: Runtime deprecation.
23972400
-->
23982401

2399-
Type: Runtime
2402+
Type: End-of-Life
24002403

24012404
The `node:dgram` module previously contained several APIs that were never meant
24022405
to accessed outside of Node.js core: `Socket.prototype._handle`,

lib/dgram.js

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const {
6666
validateUint32,
6767
} = require('internal/validators');
6868
const { Buffer } = require('buffer');
69-
const { deprecate, guessHandleType, promisify } = require('internal/util');
69+
const { guessHandleType, promisify } = require('internal/util');
7070
const { isArrayBufferView } = require('internal/util/types');
7171
const EventEmitter = require('events');
7272
const { addAbortListener } = require('internal/events/abort_listener');
@@ -1044,72 +1044,6 @@ Socket.prototype.getSendQueueCount = function() {
10441044
return this[kStateSymbol].handle.getSendQueueCount();
10451045
};
10461046

1047-
// Deprecated private APIs.
1048-
ObjectDefineProperty(Socket.prototype, '_handle', {
1049-
__proto__: null,
1050-
get: deprecate(function() {
1051-
return this[kStateSymbol].handle;
1052-
}, 'Socket.prototype._handle is deprecated', 'DEP0112'),
1053-
set: deprecate(function(val) {
1054-
this[kStateSymbol].handle = val;
1055-
}, 'Socket.prototype._handle is deprecated', 'DEP0112'),
1056-
});
1057-
1058-
1059-
ObjectDefineProperty(Socket.prototype, '_receiving', {
1060-
__proto__: null,
1061-
get: deprecate(function() {
1062-
return this[kStateSymbol].receiving;
1063-
}, 'Socket.prototype._receiving is deprecated', 'DEP0112'),
1064-
set: deprecate(function(val) {
1065-
this[kStateSymbol].receiving = val;
1066-
}, 'Socket.prototype._receiving is deprecated', 'DEP0112'),
1067-
});
1068-
1069-
1070-
ObjectDefineProperty(Socket.prototype, '_bindState', {
1071-
__proto__: null,
1072-
get: deprecate(function() {
1073-
return this[kStateSymbol].bindState;
1074-
}, 'Socket.prototype._bindState is deprecated', 'DEP0112'),
1075-
set: deprecate(function(val) {
1076-
this[kStateSymbol].bindState = val;
1077-
}, 'Socket.prototype._bindState is deprecated', 'DEP0112'),
1078-
});
1079-
1080-
1081-
ObjectDefineProperty(Socket.prototype, '_queue', {
1082-
__proto__: null,
1083-
get: deprecate(function() {
1084-
return this[kStateSymbol].queue;
1085-
}, 'Socket.prototype._queue is deprecated', 'DEP0112'),
1086-
set: deprecate(function(val) {
1087-
this[kStateSymbol].queue = val;
1088-
}, 'Socket.prototype._queue is deprecated', 'DEP0112'),
1089-
});
1090-
1091-
1092-
ObjectDefineProperty(Socket.prototype, '_reuseAddr', {
1093-
__proto__: null,
1094-
get: deprecate(function() {
1095-
return this[kStateSymbol].reuseAddr;
1096-
}, 'Socket.prototype._reuseAddr is deprecated', 'DEP0112'),
1097-
set: deprecate(function(val) {
1098-
this[kStateSymbol].reuseAddr = val;
1099-
}, 'Socket.prototype._reuseAddr is deprecated', 'DEP0112'),
1100-
});
1101-
1102-
1103-
Socket.prototype._healthCheck = deprecate(function() {
1104-
healthCheck(this);
1105-
}, 'Socket.prototype._healthCheck() is deprecated', 'DEP0112');
1106-
1107-
1108-
Socket.prototype._stopReceiving = deprecate(function() {
1109-
stopReceiving(this);
1110-
}, 'Socket.prototype._stopReceiving() is deprecated', 'DEP0112');
1111-
1112-
11131047
// Legacy alias on the C++ wrapper object. This is not public API, so we may
11141048
// want to runtime-deprecate it at some point. There's no hurry, though.
11151049
ObjectDefineProperty(UDP.prototype, 'owner', {
@@ -1120,11 +1054,6 @@ ObjectDefineProperty(UDP.prototype, 'owner', {
11201054

11211055

11221056
module.exports = {
1123-
_createSocketHandle: deprecate(
1124-
_createSocketHandle,
1125-
'dgram._createSocketHandle() is deprecated',
1126-
'DEP0112',
1127-
),
11281057
createSocket,
11291058
Socket,
11301059
};

0 commit comments

Comments
 (0)