Class RPCServer

A websocket based RPC

Hierarchy

  • RPCServer

Constructors

Properties

Constructors

  • Parameters

    • url: string
    • key: string
    • getImports: (() => Record<string, unknown>)
        • (): Record<string, unknown>
        • Returns Record<string, unknown>

    • logger: ((msg) => void) = console.log
        • (msg): void
        • Parameters

          • msg: string

          Returns void

    • ndarrayCacheUrl: string = ""
    • ndarrayCacheDevice: string = "cpu"
    • initProgressCallback: InitProgressCallback = undefined
    • asyncOnServerLoad: ((inst) => Promise<void>) = undefined
        • (inst): Promise<void>
        • Parameters

          Returns Promise<void>

    Returns RPCServer

Properties

getImports: (() => Record<string, unknown>)

Type declaration

    • (): Record<string, unknown>
    • Returns Record<string, unknown>

key: string
logger: ((msg) => void)

Type declaration

    • (msg): void
    • Parameters

      • msg: string

      Returns void

socket: WebSocket
state: RPCServerState = RPCServerState.InitHeader
url: string

Generated using TypeDoc