@@ -45,7 +45,7 @@ const {
45
45
validateNumber
46
46
} = require ( 'internal/validators' ) ;
47
47
const { Buffer } = require ( 'buffer' ) ;
48
- const util = require ( 'util' ) ;
48
+ const { deprecate } = require ( 'internal/ util' ) ;
49
49
const { isUint8Array } = require ( 'internal/util/types' ) ;
50
50
const EventEmitter = require ( 'events' ) ;
51
51
const {
@@ -729,61 +729,61 @@ Socket.prototype.getSendBufferSize = function() {
729
729
730
730
// Deprecated private APIs.
731
731
Object . defineProperty ( Socket . prototype , '_handle' , {
732
- get : util . deprecate ( function ( ) {
732
+ get : deprecate ( function ( ) {
733
733
return this [ kStateSymbol ] . handle ;
734
734
} , 'Socket.prototype._handle is deprecated' , 'DEP0112' ) ,
735
- set : util . deprecate ( function ( val ) {
735
+ set : deprecate ( function ( val ) {
736
736
this [ kStateSymbol ] . handle = val ;
737
737
} , 'Socket.prototype._handle is deprecated' , 'DEP0112' )
738
738
} ) ;
739
739
740
740
741
741
Object . defineProperty ( Socket . prototype , '_receiving' , {
742
- get : util . deprecate ( function ( ) {
742
+ get : deprecate ( function ( ) {
743
743
return this [ kStateSymbol ] . receiving ;
744
744
} , 'Socket.prototype._receiving is deprecated' , 'DEP0112' ) ,
745
- set : util . deprecate ( function ( val ) {
745
+ set : deprecate ( function ( val ) {
746
746
this [ kStateSymbol ] . receiving = val ;
747
747
} , 'Socket.prototype._receiving is deprecated' , 'DEP0112' )
748
748
} ) ;
749
749
750
750
751
751
Object . defineProperty ( Socket . prototype , '_bindState' , {
752
- get : util . deprecate ( function ( ) {
752
+ get : deprecate ( function ( ) {
753
753
return this [ kStateSymbol ] . bindState ;
754
754
} , 'Socket.prototype._bindState is deprecated' , 'DEP0112' ) ,
755
- set : util . deprecate ( function ( val ) {
755
+ set : deprecate ( function ( val ) {
756
756
this [ kStateSymbol ] . bindState = val ;
757
757
} , 'Socket.prototype._bindState is deprecated' , 'DEP0112' )
758
758
} ) ;
759
759
760
760
761
761
Object . defineProperty ( Socket . prototype , '_queue' , {
762
- get : util . deprecate ( function ( ) {
762
+ get : deprecate ( function ( ) {
763
763
return this [ kStateSymbol ] . queue ;
764
764
} , 'Socket.prototype._queue is deprecated' , 'DEP0112' ) ,
765
- set : util . deprecate ( function ( val ) {
765
+ set : deprecate ( function ( val ) {
766
766
this [ kStateSymbol ] . queue = val ;
767
767
} , 'Socket.prototype._queue is deprecated' , 'DEP0112' )
768
768
} ) ;
769
769
770
770
771
771
Object . defineProperty ( Socket . prototype , '_reuseAddr' , {
772
- get : util . deprecate ( function ( ) {
772
+ get : deprecate ( function ( ) {
773
773
return this [ kStateSymbol ] . reuseAddr ;
774
774
} , 'Socket.prototype._reuseAddr is deprecated' , 'DEP0112' ) ,
775
- set : util . deprecate ( function ( val ) {
775
+ set : deprecate ( function ( val ) {
776
776
this [ kStateSymbol ] . reuseAddr = val ;
777
777
} , 'Socket.prototype._reuseAddr is deprecated' , 'DEP0112' )
778
778
} ) ;
779
779
780
780
781
- Socket . prototype . _healthCheck = util . deprecate ( function ( ) {
781
+ Socket . prototype . _healthCheck = deprecate ( function ( ) {
782
782
healthCheck ( this ) ;
783
783
} , 'Socket.prototype._healthCheck() is deprecated' , 'DEP0112' ) ;
784
784
785
785
786
- Socket . prototype . _stopReceiving = util . deprecate ( function ( ) {
786
+ Socket . prototype . _stopReceiving = deprecate ( function ( ) {
787
787
stopReceiving ( this ) ;
788
788
} , 'Socket.prototype._stopReceiving() is deprecated' , 'DEP0112' ) ;
789
789
@@ -797,7 +797,7 @@ Object.defineProperty(UDP.prototype, 'owner', {
797
797
798
798
799
799
module . exports = {
800
- _createSocketHandle : util . deprecate (
800
+ _createSocketHandle : deprecate (
801
801
_createSocketHandle ,
802
802
'dgram._createSocketHandle() is deprecated' ,
803
803
'DEP0112'
0 commit comments