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

Method respond

packages/engine.io/lib/transports-uws/polling.ts:318–327  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

316 };
317
318 const respond = (data) => {
319 this.headers(this.req, headers);
320 this.res.cork(() => {
321 Object.keys(headers).forEach((key) => {
322 this.res.writeHeader(key, String(headers[key]));
323 });
324 this.res.end(data);
325 });
326 callback();
327 };
328
329 if (!this.httpCompression || !options.compress) {
330 respond(data);

Callers

nothing calls this directly

Calls 6

headersMethod · 0.95
corkMethod · 0.80
keysMethod · 0.80
writeHeaderMethod · 0.80
callbackFunction · 0.50
endMethod · 0.45

Tested by

no test coverage detected