Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RPCServer

A websocket based RPC

Hierarchy

  • RPCServer

Index

Constructors

Properties

Constructors

constructor

  • new RPCServer(url: string, key: string, getImports: () => Record<string, unknown>, logger?: (msg: string) => void): RPCServer
  • Parameters

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

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

          • msg: string

          Returns void

    Returns RPCServer

Properties

getImports

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

Type declaration

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

key

key: string

logger

logger: (msg: string) => void

Type declaration

    • (msg: string): void
    • Parameters

      • msg: string

      Returns void

socket

socket: WebSocket

state

state: RPCServerState = RPCServerState.InitHeader

url

url: string

Generated using TypeDoc