summaryrefslogtreecommitdiff
path: root/lib/_http_incoming.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-02-27 16:09:32 -0800
committerJames M Snell <jasnell@gmail.com>2017-03-20 16:01:31 -0700
commit5425e0dcbee1ed8f6687203eafb7c3cf214f3393 (patch)
treeaa22fd8a72932ace744132fcebc460d003f082be /lib/_http_incoming.js
parent2a4a5f0389679481b4aaafddf9fa780022b41cbb (diff)
downloadandroid-node-v8-5425e0dcbee1ed8f6687203eafb7c3cf214f3393.tar.gz
android-node-v8-5425e0dcbee1ed8f6687203eafb7c3cf214f3393.tar.bz2
android-node-v8-5425e0dcbee1ed8f6687203eafb7c3cf214f3393.zip
http: use more efficient module.exports pattern
PR-URL: https://github.com/nodejs/node/pull/11594 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'lib/_http_incoming.js')
-rw-r--r--lib/_http_incoming.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js
index b0d5c29b20..be724da310 100644
--- a/lib/_http_incoming.js
+++ b/lib/_http_incoming.js
@@ -28,14 +28,11 @@ function readStart(socket) {
if (socket && !socket._paused && socket.readable)
socket.resume();
}
-exports.readStart = readStart;
function readStop(socket) {
if (socket)
socket.pause();
}
-exports.readStop = readStop;
-
/* Abstract base class for ServerRequest and ClientResponse. */
function IncomingMessage(socket) {
@@ -83,9 +80,6 @@ function IncomingMessage(socket) {
util.inherits(IncomingMessage, Stream.Readable);
-exports.IncomingMessage = IncomingMessage;
-
-
IncomingMessage.prototype.setTimeout = function setTimeout(msecs, callback) {
if (callback)
this.on('timeout', callback);
@@ -324,3 +318,9 @@ IncomingMessage.prototype._dump = function _dump() {
this.resume();
}
};
+
+module.exports = {
+ IncomingMessage,
+ readStart,
+ readStop
+};