UNPKG

@akala/json-rpc-ws

Version:

json-rpc websocket transport

17 lines (16 loc) 508 B
import { ServerAdapter } from '../server.js'; import * as ws from 'ws'; import { SocketAdapter } from '../shared-connection.js'; export declare class Adapter implements ServerAdapter { private options?; server?: ws.WebSocketServer; closed: Promise<void>; close(): Promise<void>; onConnection(handler: (socket: SocketAdapter) => void): void; once(event: 'listening', callback: () => void): void; start(): void; /** * */ constructor(options?: ws.ServerOptions); }