MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / close

Method close

src/webui/workspaces-ipc.ts:56–65  ·  view source on GitHub ↗
(code = 1000, reason = '')

Source from the content-addressed store, hash-verified

54 }
55
56 close(code = 1000, reason = ''): void {
57 if (this.readyState !== this.OPEN) return
58 this.readyState = 3
59 try {
60 process.send?.({ type: MSG_SERVER_CLOSE, connectionId: this.connectionId, code, reason })
61 } catch {
62 // Parent may already be gone.
63 }
64 this.emit('close', code, reason)
65 }
66
67 receive(raw: unknown, isBinary: boolean): void {
68 if (this.readyState !== this.OPEN) return

Callers 2

onMessageFunction · 0.95
attachWorkspacesIpcFunction · 0.95

Calls 1

sendMethod · 0.65

Tested by

no test coverage detected