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

Method send

src/webui/workspaces-ipc.ts:47–54  ·  view source on GitHub ↗
(data: string | Buffer, opts?: { binary?: boolean }, cb?: (err?: Error) => void)

Source from the content-addressed store, hash-verified

45 }
46
47 send(data: string | Buffer, opts?: { binary?: boolean }, cb?: (err?: Error) => void): void {
48 if (!process.send || this.readyState !== this.OPEN) {
49 cb?.(new Error('IPC PTY socket is closed'))
50 return
51 }
52 const binary = opts?.binary ?? Buffer.isBuffer(data)
53 process.send({ type: MSG_SERVER, connectionId: this.connectionId, binary, data }, (err) => cb?.(err ?? undefined))
54 }
55
56 close(code = 1000, reason = ''): void {
57 if (this.readyState !== this.OPEN) return

Callers

nothing calls this directly

Calls 1

sendMethod · 0.65

Tested by

no test coverage detected