setStreamHandlerMatch method
SetStreamHandlerMatch sets the protocol handler on the Host's Mux using a matching function for protocol selection.
Implementation
@override
void setStreamHandlerMatch(ProtocolID pid, bool Function(ProtocolID) match, StreamHandler handler) {
_mux.addHandlerWithFunc(pid, match, _handlerFunc(handler));
// Emit protocol updated event
if (_evtLocalProtocolsUpdated != null) {
_evtLocalProtocolsUpdated!.emit(EvtLocalProtocolsUpdated(added: [pid], removed: []));
}
}