mirror of https://github.com/nodejs/node.git
TLS: Add _pendingBytes()
parent
33e8e3d799
commit
3e5b568504
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…
Reference in New Issue