cookie: false

This commit is contained in:
2020-10-23 17:12:41 +02:00
parent c8dd780fdf
commit 7d88f1b910
4 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rpclibrary", "name": "rpclibrary",
"version": "2.1.2", "version": "2.2.0",
"description": "rpclibrary is a websocket RPC library", "description": "rpclibrary is a websocket RPC library",
"main": "./js/Index.js", "main": "./js/Index.js",
"repository": { "repository": {
+2 -6
View File
@@ -32,13 +32,9 @@ export class RPCSocket<Ifc extends T.RPCInterface = T.RPCInterface> implements I
* @param server Server address * @param server Server address
* @param tls @default false use TLS * @param tls @default false use TLS
*/ */
constructor(public port:number, private server: string, private conf:T.SocketConf = { tls: false }){ constructor(public port:number, private server: string, conf:T.SocketConf = { tls: false }){
Object.defineProperty(this, 'socket', {value: undefined, writable: true}) Object.defineProperty(this, 'socket', {value: undefined, writable: true})
if(conf.tls){ this.protocol = conf.tls ? "https:" : "http:"
this.protocol = "https:"
}else{
this.protocol = "http:"
}
} }
/** /**
+3 -1
View File
@@ -38,7 +38,9 @@ export class PromiseIO {
} }
listen(port: number) { listen(port: number) {
this.httpServer!.listen(port) this.io!.listen(port, {
cookie: false
})
} }
on(eventName: string, listener: T.AnyFunction) { on(eventName: string, listener: T.AnyFunction) {
-1
View File
@@ -72,7 +72,6 @@ export type exportT = {
[group in string]: {} [group in string]: {}
} }
//This probably has lots of issues
export type RPCDefinitions<Ifc extends RPCInterface> = { export type RPCDefinitions<Ifc extends RPCInterface> = {
[grp in keyof Ifc]:( { [rpc in keyof Ifc[grp]]: RPC<rpc, Ifc[grp][rpc]> }[keyof Ifc[grp]] )[] [grp in keyof Ifc]:( { [rpc in keyof Ifc[grp]]: RPC<rpc, Ifc[grp][rpc]> }[keyof Ifc[grp]] )[]
} }