remotePeer property
RemotePeer returns the peer ID of the remote peer.
Implementation
@override
PeerId get remotePeer { // remotePeer might be null initially for raw incoming
if (_remotePeerId == null) {
// This case should be handled by higher layers after security handshake.
// For now, throw or return a placeholder if accessed too early.
throw StateError('Remote PeerId not yet established for this raw connection.');
}
return _remotePeerId!;
}