firstSupportedProtocol abstract method

Future<ProtocolID?> firstSupportedProtocol(
  1. PeerId id,
  2. List<ProtocolID> protocols
)

FirstSupportedProtocol returns the first protocol that the peer supports among the given protocols. If the peer does not support any of the given protocols, this function will return null.

Implementation

Future<ProtocolID?> firstSupportedProtocol(PeerId id, List<ProtocolID> protocols);