public static getUIServerImplementation(
applicationProtocol: ApplicationProtocol,
- options?: ServerOptions,
- callback?: () => void
+ options?: ServerOptions
): AbstractUIServer | null {
switch (applicationProtocol) {
case ApplicationProtocol.WS:
- return new UIWebSocketServer(options ?? Configuration.getUIServer().options, callback);
+ return new UIWebSocketServer(options ?? Configuration.getUIServer().options);
default:
return null;
}
import logger from '../../utils/Logger';
export default class UIWebSocketServer extends AbstractUIServer {
- public constructor(options?: ServerOptions, callback?: () => void) {
+ public constructor(options?: ServerOptions) {
super();
- this.uiServer = new Server(options ?? Configuration.getUIServer().options, callback);
+ this.uiServer = new Server(options ?? Configuration.getUIServer().options);
}
public start(): void {
-import { ServerOptions as HttpServerOptions } from 'http';
+import { ListenOptions } from 'net';
import { StorageType } from './Storage';
import { ServerOptions as WSServerOptions } from 'ws';
import type { WorkerChoiceStrategy } from 'poolifier';
import { WorkerProcessType } from './Worker';
-export type ServerOptions = WSServerOptions & HttpServerOptions;
+export type ServerOptions = WSServerOptions & ListenOptions;
export enum SupervisionUrlDistribution {
ROUND_ROBIN = 'round-robin',