diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-12-13 07:39:29 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2017-12-15 19:38:01 -0200 |
commit | 6918fff9c91efb6b3fb7a4b4b9ac928d63d9b89b (patch) | |
tree | 2f4266a4ffc8826af439cf5e459cf4a20e608ec3 | |
parent | 19b44854773623b684a172cc972b6c3e2e7981b6 (diff) | |
download | android-node-v8-6918fff9c91efb6b3fb7a4b4b9ac928d63d9b89b.tar.gz android-node-v8-6918fff9c91efb6b3fb7a4b4b9ac928d63d9b89b.tar.bz2 android-node-v8-6918fff9c91efb6b3fb7a4b4b9ac928d63d9b89b.zip |
net: remove Socket.prototype.write
This is superfluous now that typechecking in `net` and
`stream` are aligned.
PR-URL: https://github.com/nodejs/node/pull/17644
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
-rw-r--r-- | lib/net.js | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/net.js b/lib/net.js index f962a848fa..5562db6ed6 100644 --- a/lib/net.js +++ b/lib/net.js @@ -701,17 +701,6 @@ protoGetter('localPort', function localPort() { }); -Socket.prototype.write = function(chunk, encoding, cb) { - if (typeof chunk !== 'string' && !(chunk instanceof Buffer)) { - throw new errors.TypeError('ERR_INVALID_ARG_TYPE', - 'chunk', - ['string', 'Buffer'], - chunk); - } - return stream.Duplex.prototype.write.apply(this, arguments); -}; - - Socket.prototype._writeGeneric = function(writev, data, encoding, cb) { // If we are still connecting, then buffer this for later. // The Writable logic will buffer up any more writes while |