wsStream method
Route
wsStream(
- String path,
- WsOnConnect onConnect, {
- Map<
String, String> ? pathRegEx, - List<
RouteInterceptor> ? after, - List<
RouteInterceptor> ? before, - List<
ExceptionHandler> ? onException,
Example: server.wsStream('/ws', (ctx, ws) => Stream.periodic);
Implementation
Route wsStream(
String path, WsOnConnect /* < Stream<T> | Response > */ onConnect,
{Map<String, String>? pathRegEx,
List<RouteInterceptor>? after,
List<RouteInterceptor>? before,
List<ExceptionHandler>? onException}) {
return addRoute(Route.get(path, ws.wsStream(onConnect),
pathRegEx: pathRegEx,
before: before,
after: after,
onException: onException));
}