Browse Source

TLS: Add _pendingBytes()

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
3e5b568504
  1. 10
      lib/tls.js

10
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);

Loading…
Cancel
Save