fixedAddressWebSocketLookUps function

AtLookUpFactory fixedAddressWebSocketLookUps({
  1. required String host,
  2. required int port,
  3. String path = '/ws',
  4. Future<void> onConnect(
    1. AtCommandExecutor connection
    )?,
})

An AtLookUpFactory for development, connecting every atSign to the atServer at wss://host:port + path without asking the atDirectory.

onConnect runs on each connection before anything else is sent on it.

Implementation

AtLookUpFactory fixedAddressWebSocketLookUps({
  required String host,
  required int port,
  String path = '/ws',
  Future<void> Function(AtCommandExecutor connection)? onConnect,
}) =>
    _webSocketLookUps(
        path: path,
        finderFor: (_) => FixedSecondaryAddressFinder(host, port),
        onConnect: onConnect);