HandlerFunc typedef
HandlerFunc =
void Function(ProtocolID protocol, P2PStream stream)
HandlerFunc is a user-provided function used by the Router to handle a protocol/stream.
Will be invoked with the protocol ID string as the first argument, which may differ from the ID used for registration if the handler was registered using a match function.
Implementation
typedef HandlerFunc = void Function(ProtocolID protocol, P2PStream<dynamic> stream);