MCPcopy
hub / github.com/socketio/socket.io / respond

Method respond

packages/engine.io/lib/transports/polling.ts:280–286  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

278 };
279
280 const respond = (data) => {
281 headers["Content-Length"] =
282 "string" === typeof data ? Buffer.byteLength(data) : data.length;
283 this.res.writeHead(200, this.headers(this.req, headers));
284 this.res.end(data);
285 callback();
286 };
287
288 if (!this.httpCompression || !options.compress) {
289 respond(data);

Callers

nothing calls this directly

Calls 4

headersMethod · 0.95
callbackFunction · 0.50
writeHeadMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected