negotiate abstract method

Future<(ProtocolID, HandlerFunc)> negotiate(
  1. P2PStream stream
)

Negotiate will return the registered protocol handler to use for a given inbound stream, returning after the protocol has been determined and the Negotiator has finished using the stream for negotiation. Returns an error if negotiation fails.

Implementation

Future<(ProtocolID, HandlerFunc)> negotiate(P2PStream<dynamic> stream);