MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / connect

Function connect

__tests__/daemon-proof.test.ts:193–200  ·  view source on GitHub ↗
(socketPath: string)

Source from the content-addressed store, hash-verified

191 }
192
193 async function connect(socketPath: string): Promise<{ socket: net.Socket; next: () => Promise<string> }> {
194 const socket = net.createConnection(socketPath);
195 socket.on('error', () => { /* torn down at the end */ });
196 cleanups.push(() => { socket.destroy(); });
197 const next = lineReader(socket);
198 await new Promise<void>((resolve) => socket.once('connect', () => resolve()));
199 return { socket, next };
200 }
201
202 it('proves it holds this user\'s key, for the path it listens on, before the session starts', async () => {
203 const socketPath = uniqueSocketPath();

Callers 1

Calls 5

lineReaderFunction · 0.85
pushMethod · 0.80
resolveFunction · 0.70
onMethod · 0.65
destroyMethod · 0.45

Tested by

no test coverage detected