|
@@ -32,13 +32,9 @@ export class RPCSocket<Ifc extends T.RPCInterface = T.RPCInterface> implements I
|
32
|
32
|
* @param server Server address
|
33
|
33
|
* @param tls @default false use TLS
|
34
|
34
|
*/
|
35
|
|
- constructor(public port:number, private server: string, private conf:T.SocketConf = { tls: false }){
|
|
35
|
+ constructor(public port:number, private server: string, conf:T.SocketConf = { tls: false }){
|
36
|
36
|
Object.defineProperty(this, 'socket', {value: undefined, writable: true})
|
37
|
|
- if(conf.tls){
|
38
|
|
- this.protocol = "https:"
|
39
|
|
- }else{
|
40
|
|
- this.protocol = "http:"
|
41
|
|
- }
|
|
37
|
+ this.protocol = conf.tls ? "https:" : "http:"
|
42
|
38
|
}
|
43
|
39
|
|
44
|
40
|
/**
|