Class AbstractWsAdapter<TServer, TClient, TOptions>
Implements
- WebSocketAdapter<TServer, TClient, TOptions>
Constructors
constructor
- new AbstractWsAdapter(appOrHttpServer?: INestApplicationContext | any): AbstractWsAdapter
-
Parameters
-
Optional appOrHttpServer: INestApplicationContext | any
Properties
Protected Readonly httpServer
httpServer: any
Methods
bindClientConnect
- bindClientConnect(server: TServer, callback: Function): void
bindClientDisconnect
- bindClientDisconnect(client: TClient, callback: Function): void
Abstract bindMessageHandlers
- bindMessageHandlers(client: TClient, handlers: WsMessageHandler[], transform: (data: any) => Observable<any>): any
-
Parameters
-
client: TClient
-
handlers: WsMessageHandler[]
-
transform: (data: any) => Observable<any>
-
- (data: any): Observable<any>
-
Parameters
Returns Observable<any>
Returns any
close
- close(server: TServer): void
Abstract create
- create(port: number, options?: TOptions): TServer
-
Parameters
-
port: number
-
Optional options: TOptions
Returns TServer