fix makeSocket sesame param

This commit is contained in:
2019-11-06 11:55:48 +01:00
parent 4087a12a87
commit 70cd62bbbd
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rpclibrary", "name": "rpclibrary",
"version": "1.4.0", "version": "1.4.1",
"description": "rpclibrary is a websocket on steroids!", "description": "rpclibrary is a websocket on steroids!",
"main": "./js/Index.js", "main": "./js/Index.js",
"repository": { "repository": {
+2 -2
View File
@@ -17,9 +17,9 @@ function stripAfterEquals(str:string):string{
* A websocket-on-steroids with built-in RPC capabilities * A websocket-on-steroids with built-in RPC capabilities
*/ */
export class RPCSocket implements I.Socket{ export class RPCSocket implements I.Socket{
static async makeSocket<T extends T.RPCInterface= T.RPCInterface>(port:number, server: string, conf?:T.SocketConf): Promise<RPCSocket & T.RPCInterface<T>> { static async makeSocket<T extends T.RPCInterface= T.RPCInterface>(port:number, server: string, sesame?:string, conf?:T.SocketConf): Promise<RPCSocket & T.RPCInterface<T>> {
const socket = <RPCSocket & T> new RPCSocket(port, server, conf) const socket = <RPCSocket & T> new RPCSocket(port, server, conf)
return await socket.connect<T>() return await socket.connect<T>(sesame)
} }
private socket: I.Socket private socket: I.Socket