@noveo/dual-rpc-ws
Advanced tools
Comparing version 0.0.11 to 0.0.12
import WebSocket, { ServerOptions as WSServerOptions } from 'ws'; | ||
declare type id = string; | ||
export interface ServerOptions extends WSServerOptions { | ||
handshake?: (token: id) => Promise<boolean>; | ||
handshake?: (token: id, ws: DeviceSocket) => Promise<boolean>; | ||
} | ||
@@ -14,3 +14,3 @@ export interface DeviceSocket extends WebSocket { | ||
reject: Function; | ||
private id; | ||
private readonly id; | ||
constructor({ server, timeout, resolve, reject, id, }: { | ||
@@ -29,3 +29,3 @@ server: Server; | ||
requests: Map<id, Request>; | ||
private handshake; | ||
private readonly handshake; | ||
constructor(params: ServerOptions); | ||
@@ -32,0 +32,0 @@ call(token: string, method: string, params: object): Promise<object>; |
{ | ||
"name": "@noveo/dual-rpc-ws", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Remote procedure call", | ||
@@ -5,0 +5,0 @@ "browser": "build/client.js", |
22446