|
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,
|
@@ -131,7 +130,7 @@ function getNewAsyncId(handle) {
|
131 | 130 | }
|
132 | 131 |
|
133 | 132 |
|
134 |
| -const debug = debuglog('net'); |
| 133 | +const debug = util.debuglog('net'); |
135 | 134 |
|
136 | 135 | function isPipeName(s) {
|
137 | 136 | return typeof s === 'string' && toNumber(s) === false;
|
@@ -336,8 +335,7 @@ function Socket(options) {
|
336 | 335 | this[kBytesRead] = 0;
|
337 | 336 | this[kBytesWritten] = 0;
|
338 | 337 | }
|
339 |
| -Object.setPrototypeOf(Socket.prototype, stream.Duplex.prototype); |
340 |
| -Object.setPrototypeOf(Socket, stream.Duplex); |
| 338 | +util.inherits(Socket, stream.Duplex); |
341 | 339 |
|
342 | 340 | // Refresh existing timeouts.
|
343 | 341 | Socket.prototype._unrefTimer = function _unrefTimer() {
|
@@ -1414,7 +1412,7 @@ Server.prototype.listen = function(...args) {
|
1414 | 1412 | 'must have the property "port" or "path"');
|
1415 | 1413 | }
|
1416 | 1414 |
|
1417 |
| - throw new ERR_INVALID_OPT_VALUE('options', inspect(options)); |
| 1415 | + throw new ERR_INVALID_OPT_VALUE('options', util.inspect(options)); |
1418 | 1416 | };
|
1419 | 1417 |
|
1420 | 1418 | function lookupAndListen(self, port, address, backlog, exclusive, flags) {
|
|
0 commit comments