Route.websocket constructor

Route.websocket(
  1. String name, {
  2. required WebSocketResource websocket,
  3. List<Middleware> middlewares = const [],
})

Implementation

factory Route.websocket(
  String name, {
  required WebSocketResource websocket,
  List<Middleware> middlewares = const [],
}) {
  return Route._(
    handler: websocket.handler,
    name: name,
    schema: 'GET',
    middlewares: middlewares,
  );
}