cookie: false
This commit is contained in:
+1
-1
@@ -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
@@ -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:"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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]] )[]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user