now opening and closing correclty on server and client side

This commit is contained in:
2018-03-28 00:38:32 +02:00
parent bafa94c6ac
commit c8c481fda0
6 changed files with 37 additions and 26 deletions

View File

@ -64,8 +64,10 @@ export class Universe {
port: 12345 // fix this within smartsocket
});
this.smartsocket.setServer(this.smartexpressServer as any); // should work with express as well
this.smartsocket.startServer();
this.smartsocket.setExternalServer(
'express',
this.smartexpressServer as any); // should work with express as well
this.smartsocket.start();
// route handling
// adds messages
@ -90,6 +92,7 @@ export class Universe {
}
public async stopServer() {
await this.smartsocket.stop();
await this.smartexpressServer.stop();
}
}

View File

@ -49,4 +49,8 @@ export class UniverseClient {
}
return this.observableIntake.observable;
}
public close () {
this.socketClient.disconnect();
}
}