MCPcopy Create free account
hub / github.com/Effect-TS/effect / receive

Method receive

packages/platform/node-shared/src/internal/proxyProcess.ts:404–418  ·  view source on GitHub ↗
(message: Message)

Source from the content-addressed store, hash-verified

402 }
403
404 private receive(message: Message): void {
405 if (message._tag === "Ready") return this.onReady()
406 const command = this.commands.get(message.id)
407 if (command === undefined) return
408 switch (message._tag) {
409 case "Spawned":
410 this.stopTimer(message.id)
411 return command.onSpawned(message.pid)
412 case "Exit":
413 return command.onExit(message.code, message.signal)
414 case "Error":
415 this.stopTimer(message.id)
416 return command.onError(deserializeError(message.error))
417 }
418 }
419
420 private onReady(): void {
421 if (this.ready || this.exited) return

Callers 1

constructorMethod · 0.95

Calls 7

onReadyMethod · 0.95
stopTimerMethod · 0.95
deserializeErrorFunction · 0.85
onSpawnedMethod · 0.80
onExitMethod · 0.80
onErrorMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected