MCPcopy Index your code
hub / github.com/nodejs/node / OutgoingMessage

Function OutgoingMessage

lib/_http_outgoing.js:106–158  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

104}
105
106function OutgoingMessage(options) {
107 Stream.call(this);
108
109 // Queue that holds all currently pending data, until the response will be
110 // assigned to the socket (until it will its turn in the HTTP pipeline).
111 this.outputData = [];
112
113 // `outputSize` is an approximate measure of how much data is queued on this
114 // response. `_onPendingData` will be invoked to update similar global
115 // per-connection counter. That counter will be used to pause/unpause the
116 // TCP socket and HTTP Parser and thus handle the backpressure.
117 this.outputSize = 0;
118
119 this.writable = true;
120 this.destroyed = false;
121
122 this._last = false;
123 this.chunkedEncoding = false;
124 this.shouldKeepAlive = true;
125 this.maxRequestsOnConnectionReached = false;
126 this._defaultKeepAlive = true;
127 this.useChunkedEncodingByDefault = true;
128 this.sendDate = false;
129 this._removedConnection = false;
130 this._removedContLen = false;
131 this._removedTE = false;
132
133 this.strictContentLength = false;
134 this[kBytesWritten] = 0;
135 this._contentLength = null;
136 this._hasBody = true;
137 this._trailer = '';
138 this[kNeedDrain] = false;
139
140 this.finished = false;
141 this._headerSent = false;
142 this[kCorked] = 0;
143 this[kChunkedBuffer] = [];
144 this[kChunkedLength] = 0;
145 this._closed = false;
146
147 this[kSocket] = null;
148 this._header = null;
149 this[kOutHeaders] = null;
150
151 this._keepAliveTimeout = 0;
152
153 this._onPendingData = nop;
154
155 this[kErrored] = null;
156 this[kHighWaterMark] = options?.highWaterMark ?? getDefaultHighWaterMark();
157 this[kRejectNonStandardBodyWrites] = options?.rejectNonStandardBodyWrites ?? false;
158}
159ObjectSetPrototypeOf(OutgoingMessage.prototype, Stream.prototype);
160ObjectSetPrototypeOf(OutgoingMessage, Stream);
161

Callers

nothing calls this directly

Calls 2

getDefaultHighWaterMarkFunction · 0.85
callMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…