listTunnels method

Future<List<TunnelInfo>> listTunnels()

Lists the caller's active tunnels held by the Hub.

Implementation

Future<List<TunnelInfo>> listTunnels() {
  _ensureConnected();
  final id = newId();
  final completer = Completer<List<TunnelInfo>>();
  _pendingTunnelLists[id] = completer;
  _connection!.send(ControlFrame(TunnelListRequest(requestId: id)));
  return completer.future;
}