@@ -737,65 +737,65 @@ Socket.prototype.getSendBufferSize = function() {
737737} ;
738738
739739
740- // Legacy private APIs to be deprecated in the future .
740+ // Deprecated private APIs.
741741Object . defineProperty ( Socket . prototype , '_handle' , {
742- get ( ) {
742+ get : util . deprecate ( function ( ) {
743743 return this [ kStateSymbol ] . handle ;
744- } ,
745- set ( val ) {
744+ } , 'Socket.prototype._handle is deprecated' , 'DEP0112' ) ,
745+ set : util . deprecate ( function ( val ) {
746746 this [ kStateSymbol ] . handle = val ;
747- }
747+ } , 'Socket.prototype._handle is deprecated' , 'DEP0112' )
748748} ) ;
749749
750750
751751Object . defineProperty ( Socket . prototype , '_receiving' , {
752- get ( ) {
752+ get : util . deprecate ( function ( ) {
753753 return this [ kStateSymbol ] . receiving ;
754- } ,
755- set ( val ) {
754+ } , 'Socket.prototype._receiving is deprecated' , 'DEP0112' ) ,
755+ set : util . deprecate ( function ( val ) {
756756 this [ kStateSymbol ] . receiving = val ;
757- }
757+ } , 'Socket.prototype._receiving is deprecated' , 'DEP0112' )
758758} ) ;
759759
760760
761761Object . defineProperty ( Socket . prototype , '_bindState' , {
762- get ( ) {
762+ get : util . deprecate ( function ( ) {
763763 return this [ kStateSymbol ] . bindState ;
764- } ,
765- set ( val ) {
764+ } , 'Socket.prototype._bindState is deprecated' , 'DEP0112' ) ,
765+ set : util . deprecate ( function ( val ) {
766766 this [ kStateSymbol ] . bindState = val ;
767- }
767+ } , 'Socket.prototype._bindState is deprecated' , 'DEP0112' )
768768} ) ;
769769
770770
771771Object . defineProperty ( Socket . prototype , '_queue' , {
772- get ( ) {
772+ get : util . deprecate ( function ( ) {
773773 return this [ kStateSymbol ] . queue ;
774- } ,
775- set ( val ) {
774+ } , 'Socket.prototype._queue is deprecated' , 'DEP0112' ) ,
775+ set : util . deprecate ( function ( val ) {
776776 this [ kStateSymbol ] . queue = val ;
777- }
777+ } , 'Socket.prototype._queue is deprecated' , 'DEP0112' )
778778} ) ;
779779
780780
781781Object . defineProperty ( Socket . prototype , '_reuseAddr' , {
782- get ( ) {
782+ get : util . deprecate ( function ( ) {
783783 return this [ kStateSymbol ] . reuseAddr ;
784- } ,
785- set ( val ) {
784+ } , 'Socket.prototype._reuseAddr is deprecated' , 'DEP0112' ) ,
785+ set : util . deprecate ( function ( val ) {
786786 this [ kStateSymbol ] . reuseAddr = val ;
787- }
787+ } , 'Socket.prototype._reuseAddr is deprecated' , 'DEP0112' )
788788} ) ;
789789
790790
791- Socket . prototype . _healthCheck = function ( ) {
791+ Socket . prototype . _healthCheck = util . deprecate ( function ( ) {
792792 healthCheck ( this ) ;
793- } ;
793+ } , 'Socket.prototype._healthCheck() is deprecated' , 'DEP0112' ) ;
794794
795795
796- Socket . prototype . _stopReceiving = function ( ) {
796+ Socket . prototype . _stopReceiving = util . deprecate ( function ( ) {
797797 stopReceiving ( this ) ;
798- } ;
798+ } , 'Socket.prototype._stopReceiving() is deprecated' , 'DEP0112' ) ;
799799
800800
801801// Legacy alias on the C++ wrapper object. This is not public API, so we may
@@ -807,7 +807,11 @@ Object.defineProperty(UDP.prototype, 'owner', {
807807
808808
809809module . exports = {
810- _createSocketHandle,
810+ _createSocketHandle : util . deprecate (
811+ _createSocketHandle ,
812+ 'dgram._createSocketHandle() is deprecated' ,
813+ 'DEP0112'
814+ ) ,
811815 createSocket,
812816 Socket
813817} ;
0 commit comments