mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
quic: proper custom inspect for QuicStream
PR-URL: https://github.com/nodejs/node/pull/34247 Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
0860b11655
commit
458d243f20
1 file changed
+4
-11
@@ -44,7 +44,6 @@ const {
|
||||
QuicSessionSharedState,
|
||||
QLogStream,
|
||||
} = require('internal/quic/util');
|
||||
const util = require('util');
|
||||
const assert = require('internal/assert');
|
||||
const EventEmitter = require('events');
|
||||
const fs = require('fs');
|
||||
@@ -2713,23 +2712,17 @@ class QuicStream extends Duplex {
|
||||
// TODO(@jasnell): Implement this
|
||||
}
|
||||
|
||||
[kInspect]() {
|
||||
[kInspect](depth, options) {
|
||||
// TODO(@jasnell): Proper custom inspect implementation
|
||||
const direction = this.bidirectional ? 'bidirectional' : 'unidirectional';
|
||||
const initiated = this.serverInitiated ? 'server' : 'client';
|
||||
const obj = {
|
||||
return customInspect(this, {
|
||||
id: this[kInternalState].id,
|
||||
direction,
|
||||
initiated,
|
||||
writableState: this._writableState,
|
||||
readableState: this._readableState,
|
||||
stats: {
|
||||
dataRate: this.dataRateHistogram,
|
||||
dataSize: this.dataSizeHistogram,
|
||||
dataAck: this.dataAckHistogram,
|
||||
}
|
||||
};
|
||||
return `QuicStream ${util.format(obj)}`;
|
||||
readableState: this._readableState
|
||||
}, depth, options);
|
||||
}
|
||||
|
||||
[kTrackWriteState](stream, bytes) {
|
||||
|
||||
Reference in new issue
Block a user