summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-01-31 17:29:11 -0800
committerRyan Dahl <ry@tinyclouds.org>2011-01-31 17:29:11 -0800
commit3e5b56850415638107a6465465c22659a91bb797 (patch)
treeebb0602b1df76f9b5761312e7e47dc31ae7ec1c0
parent33e8e3d799f7b04991728218bb1c411e01ffcfe2 (diff)
downloadnodejs-3e5b56850415638107a6465465c22659a91bb797.tar.gz
nodejs-3e5b56850415638107a6465465c22659a91bb797.tar.bz2
nodejs-3e5b56850415638107a6465465c22659a91bb797.zip
TLS: Add _pendingBytes()
-rw-r--r--lib/tls.js10
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);