@@ -737,65 +737,65 @@ Socket.prototype.getSendBufferSize = function() {
737
737
} ;
738
738
739
739
740
- // Legacy private APIs to be deprecated in the future .
740
+ // Deprecated private APIs.
741
741
Object . defineProperty ( Socket . prototype , '_handle' , {
742
- get ( ) {
742
+ get : util . deprecate ( function ( ) {
743
743
return this [ kStateSymbol ] . handle ;
744
- } ,
745
- set ( val ) {
744
+ } , 'Socket.prototype._handle is deprecated' , 'DEP0112' ) ,
745
+ set : util . deprecate ( function ( val ) {
746
746
this [ kStateSymbol ] . handle = val ;
747
- }
747
+ } , 'Socket.prototype._handle is deprecated' , 'DEP0112' )
748
748
} ) ;
749
749
750
750
751
751
Object . defineProperty ( Socket . prototype , '_receiving' , {
752
- get ( ) {
752
+ get : util . deprecate ( function ( ) {
753
753
return this [ kStateSymbol ] . receiving ;
754
- } ,
755
- set ( val ) {
754
+ } , 'Socket.prototype._receiving is deprecated' , 'DEP0112' ) ,
755
+ set : util . deprecate ( function ( val ) {
756
756
this [ kStateSymbol ] . receiving = val ;
757
- }
757
+ } , 'Socket.prototype._receiving is deprecated' , 'DEP0112' )
758
758
} ) ;
759
759
760
760
761
761
Object . defineProperty ( Socket . prototype , '_bindState' , {
762
- get ( ) {
762
+ get : util . deprecate ( function ( ) {
763
763
return this [ kStateSymbol ] . bindState ;
764
- } ,
765
- set ( val ) {
764
+ } , 'Socket.prototype._bindState is deprecated' , 'DEP0112' ) ,
765
+ set : util . deprecate ( function ( val ) {
766
766
this [ kStateSymbol ] . bindState = val ;
767
- }
767
+ } , 'Socket.prototype._bindState is deprecated' , 'DEP0112' )
768
768
} ) ;
769
769
770
770
771
771
Object . defineProperty ( Socket . prototype , '_queue' , {
772
- get ( ) {
772
+ get : util . deprecate ( function ( ) {
773
773
return this [ kStateSymbol ] . queue ;
774
- } ,
775
- set ( val ) {
774
+ } , 'Socket.prototype._queue is deprecated' , 'DEP0112' ) ,
775
+ set : util . deprecate ( function ( val ) {
776
776
this [ kStateSymbol ] . queue = val ;
777
- }
777
+ } , 'Socket.prototype._queue is deprecated' , 'DEP0112' )
778
778
} ) ;
779
779
780
780
781
781
Object . defineProperty ( Socket . prototype , '_reuseAddr' , {
782
- get ( ) {
782
+ get : util . deprecate ( function ( ) {
783
783
return this [ kStateSymbol ] . reuseAddr ;
784
- } ,
785
- set ( val ) {
784
+ } , 'Socket.prototype._reuseAddr is deprecated' , 'DEP0112' ) ,
785
+ set : util . deprecate ( function ( val ) {
786
786
this [ kStateSymbol ] . reuseAddr = val ;
787
- }
787
+ } , 'Socket.prototype._reuseAddr is deprecated' , 'DEP0112' )
788
788
} ) ;
789
789
790
790
791
- Socket . prototype . _healthCheck = function ( ) {
791
+ Socket . prototype . _healthCheck = util . deprecate ( function ( ) {
792
792
healthCheck ( this ) ;
793
- } ;
793
+ } , 'Socket.prototype._healthCheck() is deprecated' , 'DEP0112' ) ;
794
794
795
795
796
- Socket . prototype . _stopReceiving = function ( ) {
796
+ Socket . prototype . _stopReceiving = util . deprecate ( function ( ) {
797
797
stopReceiving ( this ) ;
798
- } ;
798
+ } , 'Socket.prototype._stopReceiving() is deprecated' , 'DEP0112' ) ;
799
799
800
800
801
801
// Legacy alias on the C++ wrapper object. This is not public API, so we may
@@ -807,7 +807,11 @@ Object.defineProperty(UDP.prototype, 'owner', {
807
807
808
808
809
809
module . exports = {
810
- _createSocketHandle,
810
+ _createSocketHandle : util . deprecate (
811
+ _createSocketHandle ,
812
+ 'dgram._createSocketHandle() is deprecated' ,
813
+ 'DEP0112'
814
+ ) ,
811
815
createSocket,
812
816
Socket
813
817
} ;
0 commit comments