MCPcopy Index your code
hub / github.com/coder/code-server / handshake

Method handshake

src/node/wrapper.ts:350–363  ·  view source on GitHub ↗

* Wait for a handshake from the child then reply.

(child: cp.ChildProcess)

Source from the content-addressed store, hash-verified

348 * Wait for a handshake from the child then reply.
349 */
350 private async handshake(child: cp.ChildProcess): Promise<void> {
351 if (!this.args) {
352 throw new Error("started without args")
353 }
354 const message = await onMessage<ChildMessage, ChildHandshakeMessage>(
355 child,
356 (message): message is ChildHandshakeMessage => {
357 return message.type === "handshake"
358 },
359 this.logger,
360 )
361 this.logger.debug("got message", field("message", message))
362 this.send(child, { type: "handshake", args: this.args })
363 }
364
365 /**
366 * Send a message to the child.

Callers 1

_startMethod · 0.95

Calls 1

sendMethod · 0.95

Tested by

no test coverage detected