handle method

  1. @override
Future<HubResponse> handle(
  1. HubRequest request
)

A plain HTTP request on the mount: this is a WebSocket endpoint, so answer with a small status document rather than an upgrade.

Implementation

@override
Future<omnyhub.HubResponse> handle(omnyhub.HubRequest request) async =>
    omnyhub.HubResponse.json({
      'service': 'omnyshell',
      'protocol': 'websocket',
      'hubUid': broker.hubUid,
      'nodes': broker.registry.all.length,
    });