verifyPeer method

bool verifyPeer()

Validates that the peer's selected ALPN is acceptable and a PeerId has been derived.

Returns true when the ALPN matches and a peer identity is present. This is a foundation-level check; a future iteration will also verify the libp2p TLS extension in the peer's certificate.

Implementation

bool verifyPeer() {
  _delegate.validateAlpn();
  return _delegate.peerId != null;
}