fix(websocket): switch to all websocket infrastructure

This commit is contained in:
Philipp Kunz 2018-05-30 16:34:06 +02:00
parent 7552dc1e9f
commit c2d134a6ea
2 changed files with 304 additions and 291 deletions

582
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -79,6 +79,19 @@ export class Universe {
port: 12345 // fix this within smartsocket
});
const ClientRole = new plugins.smartsocket.SocketRole({
name: 'clientuniverse',
passwordHash: 'clientuniverse' // authentication happens on another level
});
this.smartsocket.addSocketRoles([ClientRole]);
const SubscriptionSocketFunction = new plugins.smartsocket.SocketFunction({
allowedRoles: [ClientRole],
funcName: 'channelSubscription',
funcDef: () => {}
});
this.smartsocket.setExternalServer('express', this.smartexpressServer as any);
// should work with express as well
this.smartsocket.start();