MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / writeSocketMessageAndDestroy

Function writeSocketMessageAndDestroy

src/utils/udsMessaging.ts:357–365  ·  view source on GitHub ↗
(
  socket: Socket,
  message: UdsMessage,
)

Source from the content-addressed store, hash-verified

355}
356
357function writeSocketMessageAndDestroy(
358 socket: Socket,
359 message: UdsMessage,
360): void {
361 if (socket.destroyed) return
362 socket.write(jsonStringify(message) + '\n', () => {
363 if (!socket.destroyed) socket.destroy()
364 })
365}
366
367function writeSocketErrorAndDestroy(socket: Socket, data: string): void {
368 writeSocketMessageAndDestroy(socket, {

Callers 1

Calls 3

jsonStringifyFunction · 0.85
writeMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected