code: func (h *BasicHost) SetStreamHandlerMatch(pid protocol.ID, m func(string) bool, handler inet.StreamHandler) {
  	h.Mux().AddHandlerWithFunc(string(pid), m, func(p string, rwc io.ReadWriteCloser) error {
  		is := rwc.(inet.Stream)
  		is.SetProtocol(protocol.ID(p))
  		handler(is)
  		return nil
  	})
  }
docs: // SetStreamHandlerMatch sets the protocol handler on the Host's Mux
  // using a matching function to do protocol comparisons