diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-05-20 17:14:30 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-05-20 17:18:50 +0400 |
commit | d820b6441211ce79ed09ee3ef3992bc48e78bd93 (patch) | |
tree | a96254cc5983b46437ad8b11e84c3e518502e13e /lib/tls.js | |
parent | 812356049d67718aa8af51ce8dcac97144d54333 (diff) |
tls: add localAddress and localPort properties
Add localAddress and localPort properties to tls.CleartextStream.
Like remoteAddress and localPort, delegate to the backing net.Socket
object.
Refs #5502.
Diffstat (limited to 'lib/tls.js')
-rw-r--r-- | lib/tls.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/tls.js b/lib/tls.js index 0c5bb633bb6..c0b59d99b7b 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -695,6 +695,17 @@ CleartextStream.prototype.__defineGetter__('remotePort', function() { return this.socket && this.socket.remotePort; }); + +CleartextStream.prototype.__defineGetter__('localAddress', function() { + return this.socket && this.socket.localAddress; +}); + + +CleartextStream.prototype.__defineGetter__('localPort', function() { + return this.socket && this.socket.localPort; +}); + + function EncryptedStream(pair, options) { CryptoStream.call(this, pair, options); } |