Moved some code around for clarity

pull/189/head
murgatroid99 10 years ago
parent 46c2461c8b
commit 2ed57b4858
  1. 28
      src/node/surface_client.js
  2. 27
      src/node/surface_server.js

@ -79,6 +79,20 @@ function ClientReadableObjectStream(stream) {
this._stream.pause();
}
/**
* _read implementation for both types of streams that allow reading.
* @this {ClientReadableObjectStream}
* @param {number} size Ignored
*/
function _read(size) {
this._stream.resume();
}
/**
* See docs for _read
*/
ClientReadableObjectStream.prototype._read = _read;
util.inherits(ClientWritableObjectStream, Writable);
/**
@ -98,20 +112,6 @@ function ClientWritableObjectStream(stream) {
});
}
/**
* _read implementation for both types of streams that allow reading.
* @this {ClientReadableObjectStream}
* @param {number} size Ignored
*/
function _read(size) {
this._stream.resume();
}
/**
* See docs for _read
*/
ClientReadableObjectStream.prototype._read = _read;
/**
* _write implementation for both types of streams that allow writing
* @this {ClientWritableObjectStream}

@ -74,6 +74,20 @@ function ServerReadableObjectStream(stream) {
this._stream.pause();
}
/**
* _read implementation for both types of streams that allow reading.
* @this {ServerReadableObjectStream|ServerBidiObjectStream}
* @param {number} size Ignored
*/
function _read(size) {
this._stream.resume();
}
/**
* See docs for _read
*/
ServerReadableObjectStream.prototype._read = _read;
util.inherits(ServerWritableObjectStream, Writable);
/**
@ -90,19 +104,6 @@ function ServerWritableObjectStream(stream) {
this._stream.end();
});
}
/**
* _read implementation for both types of streams that allow reading.
* @this {ServerReadableObjectStream|ServerBidiObjectStream}
* @param {number} size Ignored
*/
function _read(size) {
this._stream.resume();
}
/**
* See docs for _read
*/
ServerReadableObjectStream.prototype._read = _read;
/**
* _write implementation for both types of streams that allow writing

Loading…
Cancel
Save