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

Method handshake

src/node/wrapper.ts:178–196  ·  view source on GitHub ↗

* Initiate the handshake and wait for a response from the parent.

()

Source from the content-addressed store, hash-verified

176 * Initiate the handshake and wait for a response from the parent.
177 */
178 public async handshake(): Promise<DefaultedArgs> {
179 this.logger.debug("initiating handshake")
180 this.send({ type: "handshake" })
181 const message = await onMessage<ParentMessage, ParentHandshakeMessage>(
182 process,
183 (message): message is ParentHandshakeMessage => {
184 return message.type === "handshake"
185 },
186 this.logger,
187 )
188 this.logger.debug(
189 "got message",
190 field("message", {
191 type: message.type,
192 args: redactArgs(message.args),
193 }),
194 )
195 return message.args
196 }
197
198 /**
199 * Notify the parent process that it should relaunch the child.

Callers 1

entryFunction · 0.45

Calls 2

sendMethod · 0.95
redactArgsFunction · 0.90

Tested by

no test coverage detected