state property

  1. @override
ConnState get state
override

ConnState returns information about the connection state.

Implementation

@override
ConnState get state {
  // Return empty state to indicate this connection needs to be upgraded.
  // The Swarm will then negotiate Noise + Yamux on top of this relay stream.
  // This matches go-libp2p's behavior where the circuit relay Conn is upgraded.
  return ConnState(
    streamMultiplexer: '', // Empty = not yet multiplexed
    security: '', // Empty = not yet secured
    transport: 'circuit-relay',
    usedEarlyMuxerNegotiation: false,
  );
}