diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-01-31 17:29:11 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-01-31 17:29:11 -0800 |
commit | 3e5b56850415638107a6465465c22659a91bb797 (patch) | |
tree | ebb0602b1df76f9b5761312e7e47dc31ae7ec1c0 | |
parent | 33e8e3d799f7b04991728218bb1c411e01ffcfe2 (diff) | |
download | nodejs-3e5b56850415638107a6465465c22659a91bb797.tar.gz nodejs-3e5b56850415638107a6465465c22659a91bb797.tar.bz2 nodejs-3e5b56850415638107a6465465c22659a91bb797.zip |
TLS: Add _pendingBytes()
-rw-r--r-- | lib/tls.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/tls.js b/lib/tls.js index b6afa3c59..3613b8bb8 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -290,6 +290,11 @@ function CleartextStream(pair) { util.inherits(CleartextStream, CryptoStream); +CleartextStream.prototype._pendingBytes = function() { + return this.pair._ssl._clearPending(); +}; + + CleartextStream.prototype._sucker = function(b) { debug('writng from clearIn'); return this.pair._ssl.clearIn(b, 0, b.length); @@ -309,6 +314,11 @@ function EncryptedStream(pair) { util.inherits(EncryptedStream, CryptoStream); +EncryptedStream.prototype._pendingBytes = function() { + return this.pair._ssl._endPending(); +}; + + EncryptedStream.prototype._sucker = function(b) { debug('writing from encIn'); return this.pair._ssl.encIn(b, 0, b.length); |