MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / socketWriteUnauthorized

Function socketWriteUnauthorized

services/kiloclaw/controller/src/proxy.ts:190–193  ·  view source on GitHub ↗
(socket: Duplex)

Source from the content-addressed store, hash-verified

188}
189
190function socketWriteUnauthorized(socket: Duplex): void {
191 socket.write('HTTP/1.1 401 Unauthorized\r\nConnection: close\r\n\r\n');
192 socket.destroy();
193}
194
195function socketWriteBadGateway(socket: Duplex): void {
196 socket.write('HTTP/1.1 502 Bad Gateway\r\nConnection: close\r\n\r\n');

Callers 1

handleWebSocketUpgradeFunction · 0.85

Calls 2

writeMethod · 0.80
destroyMethod · 0.65

Tested by

no test coverage detected