reconnect is now working
This commit is contained in:
@ -2,5 +2,7 @@ import * as plugins from "./smartsocket.plugins";
|
||||
|
||||
export * from "./smartsocket.classes.smartsocket";
|
||||
export * from "./smartsocket.classes.smartsocketclient";
|
||||
export * from "./smartsocket.classes.socketfunction";
|
||||
export * from "./smartsocket.classes.socketrole";
|
||||
|
||||
// need something more exposed? Create an issue on GitLab!
|
||||
// need something more exposed? Create an issue on GitLab!
|
||||
|
@ -57,6 +57,7 @@ export class Smartsocket {
|
||||
|
||||
// communication
|
||||
clientCall(){
|
||||
|
||||
// TODO: target specific client and initiate response
|
||||
}
|
||||
}
|
@ -46,7 +46,7 @@ export class SmartsocketClient {
|
||||
alias:this.alias,
|
||||
authenticated:false,
|
||||
role:undefined,
|
||||
socket: plugins.socketIoClient(socketUrl,{})
|
||||
socket: plugins.socketIoClient(socketUrl,{multiplex:false})
|
||||
});
|
||||
this.socketConnection.socket.on("requestAuth", () => {
|
||||
console.log("server requested authentication");
|
||||
@ -65,6 +65,7 @@ export class SmartsocketClient {
|
||||
disconnect(){
|
||||
let done = plugins.q.defer();
|
||||
this.socketConnection.socket.disconnect();
|
||||
this.socketConnection = undefined;
|
||||
plugins.beautylog.ok("disconnected!");
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
|
Reference in New Issue
Block a user