stat property

  1. @override
ConnStats get stat
override

Stat stores metadata pertaining to this conn.

Implementation

@override
ConnStats get stat {
  // Potentially, the underlying `conn.stat.stats.limited` could be used if available and more accurate.
  // For now, SwarmConn itself doesn't explicitly track 'limited' status beyond what ResourceManager might impose.
  // The `opened` time is now from SwarmConn's perspective.
  return _ConnStatsImpl(
    stats: Stats(
      direction: direction,
      opened: _openedTime, // Use the stored opened time
      limited: conn.stat.stats.limited, // Delegate 'limited' to underlying conn's stat
    ),
    numStreams: _streams.length,
  );
}