@@ -53,7 +53,6 @@ const {
5353} = require ( 'internal/errors' ) ;
5454const {
5555 kStateSymbol,
56- _createSocketHandle,
5756 newHandle,
5857} = require ( 'internal/dgram' ) ;
5958const { isIP } = require ( 'internal/net' ) ;
@@ -66,7 +65,7 @@ const {
6665 validateUint32,
6766} = require ( 'internal/validators' ) ;
6867const { Buffer } = require ( 'buffer' ) ;
69- const { deprecate , guessHandleType, promisify } = require ( 'internal/util' ) ;
68+ const { guessHandleType, promisify } = require ( 'internal/util' ) ;
7069const { isArrayBufferView } = require ( 'internal/util/types' ) ;
7170const EventEmitter = require ( 'events' ) ;
7271const { addAbortListener } = require ( 'internal/events/abort_listener' ) ;
@@ -1044,72 +1043,6 @@ Socket.prototype.getSendQueueCount = function() {
10441043 return this [ kStateSymbol ] . handle . getSendQueueCount ( ) ;
10451044} ;
10461045
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-
11131046// Legacy alias on the C++ wrapper object. This is not public API, so we may
11141047// want to runtime-deprecate it at some point. There's no hurry, though.
11151048ObjectDefineProperty ( UDP . prototype , 'owner' , {
@@ -1118,13 +1051,7 @@ ObjectDefineProperty(UDP.prototype, 'owner', {
11181051 set ( v ) { return this [ owner_symbol ] = v ; } ,
11191052} ) ;
11201053
1121-
11221054module . exports = {
1123- _createSocketHandle : deprecate (
1124- _createSocketHandle ,
1125- 'dgram._createSocketHandle() is deprecated' ,
1126- 'DEP0112' ,
1127- ) ,
11281055 createSocket,
11291056 Socket,
11301057} ;
0 commit comments