- (this.server as Server).listen(this.options ?? Configuration.getUIServer().options);
- }
-
- public stop(): void {
- this.chargingStations.clear();
+ this.httpServer.on('connection', (socket) => {
+ this.sockets.add(socket);
+ socket.on('close', () => {
+ this.sockets.delete(socket);
+ });
+ });
+ this.httpServer.on('request', this.requestListener.bind(this) as RequestListener);
+ if (this.httpServer.listening === false) {
+ this.httpServer.listen(this.uiServerConfiguration.options);
+ }