@ -350,8 +350,12 @@ CryptoStream.prototype.setKeepAlive = function(enable, initialDelay) {
if ( this . socket ) this . socket . setKeepAlive ( enable , initialDelay ) ;
} ;
CryptoStream . prototype . __ defineGetter__ ( 'bytesWritten' , function ( ) {
Object . defineProperty ( CryptoStream . prototype , 'bytesWritten' , {
configurable : true ,
enumerable : true ,
get : function ( ) {
return this . socket ? this . socket . bytesWritten : 0 ;
}
} ) ;
CryptoStream . prototype . getPeerCertificate = function ( detailed ) {
@ -526,27 +530,44 @@ CleartextStream.prototype.address = function() {
return this . socket && this . socket . address ( ) ;
} ;
CleartextStream . prototype . __ defineGetter__ ( 'remoteAddress' , function ( ) {
Object . defineProperty ( CleartextStream . prototype , 'remoteAddress' , {
configurable : true ,
enumerable : true ,
get : function ( ) {
return this . socket && this . socket . remoteAddress ;
}
} ) ;
CleartextStream . prototype . __ defineGetter__ ( 'remoteFamily' , function ( ) {
Object . defineProperty ( CleartextStream . prototype , 'remoteFamily' , {
configurable : true ,
enumerable : true ,
get : function ( ) {
return this . socket && this . socket . remoteFamily ;
}
} ) ;
CleartextStream . prototype . __ defineGetter__ ( 'remotePort' , function ( ) {
Object . defineProperty ( CleartextStream . prototype , 'remotePort' , {
configurable : true ,
enumerable : true ,
get : function ( ) {
return this . socket && this . socket . remotePort ;
}
} ) ;
CleartextStream . prototype . __ defineGetter__ ( 'localAddress' , function ( ) {
Object . defineProperty ( CleartextStream . prototype , 'localAddress' , {
configurable : true ,
enumerable : true ,
get : function ( ) {
return this . socket && this . socket . localAddress ;
}
} ) ;
CleartextStream . prototype . __ defineGetter__ ( 'localPort' , function ( ) {
Object . defineProperty ( CleartextStream . prototype , 'localPort' , {
configurable : true ,
enumerable : true ,
get : function ( ) {
return this . socket && this . socket . localPort ;
}
} ) ;