Implement websocket server
This commit is contained in:
@@ -9,6 +9,7 @@ import {RouteGroup} from './RouteGroup'
|
||||
import {Config} from '../../service/Config'
|
||||
import {Application} from '../../lifecycle/Application'
|
||||
import {Logging} from '../../service/Logging'
|
||||
import {WebSocketBus} from '../../support/bus/WebSocketBus'
|
||||
|
||||
/**
|
||||
* Type alias for an item that is a valid response object, or lack thereof.
|
||||
@@ -140,8 +141,8 @@ export class Route<TReturn extends ResponseObject, THandlerParams extends unknow
|
||||
* Create a new WebSocket route on the given endpoint.
|
||||
* @param endpoint
|
||||
*/
|
||||
public static socket(endpoint: string): Route<void, [void]> {
|
||||
return new Route<void, [void]>('ws', endpoint)
|
||||
public static socket(endpoint: string): Route<Awaitable<void>, [WebSocketBus]> {
|
||||
return new Route<Awaitable<void>, [WebSocketBus]>('ws', endpoint)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user