|
23 | 23 |
|
24 | 24 | const EventEmitter = require('events'); |
25 | 25 | const stream = require('stream'); |
26 | | -const { inspect } = require('internal/util/inspect'); |
27 | | -const { debuglog } = require('internal/util/debuglog'); |
| 26 | +const util = require('util'); |
28 | 27 | const internalUtil = require('internal/util'); |
29 | 28 | const { |
30 | 29 | isIP, |
@@ -130,7 +129,7 @@ function getNewAsyncId(handle) { |
130 | 129 | } |
131 | 130 |
|
132 | 131 |
|
133 | | -const debug = debuglog('net'); |
| 132 | +const debug = util.debuglog('net'); |
134 | 133 |
|
135 | 134 | function isPipeName(s) { |
136 | 135 | return typeof s === 'string' && toNumber(s) === false; |
@@ -335,8 +334,7 @@ function Socket(options) { |
335 | 334 | this[kBytesRead] = 0; |
336 | 335 | this[kBytesWritten] = 0; |
337 | 336 | } |
338 | | -Object.setPrototypeOf(Socket.prototype, stream.Duplex.prototype); |
339 | | -Object.setPrototypeOf(Socket, stream.Duplex); |
| 337 | +util.inherits(Socket, stream.Duplex); |
340 | 338 |
|
341 | 339 | // Refresh existing timeouts. |
342 | 340 | Socket.prototype._unrefTimer = function _unrefTimer() { |
@@ -1434,7 +1432,7 @@ Server.prototype.listen = function(...args) { |
1434 | 1432 | 'must have the property "port" or "path"'); |
1435 | 1433 | } |
1436 | 1434 |
|
1437 | | - throw new ERR_INVALID_OPT_VALUE('options', inspect(options)); |
| 1435 | + throw new ERR_INVALID_OPT_VALUE('options', util.inspect(options)); |
1438 | 1436 | }; |
1439 | 1437 |
|
1440 | 1438 | function lookupAndListen(self, port, address, backlog, exclusive, flags) { |
|
0 commit comments