code: func (h *BasicHost) SetStreamHandler(pid protocol.ID, handler inet.StreamHandler) {
  	h.Mux().AddHandler(string(pid), func(p string, rwc io.ReadWriteCloser) error {
  		is := rwc.(inet.Stream)
  		is.SetProtocol(protocol.ID(p))
  		handler(is)
  		return nil
  	})
  }
docs: // SetStreamHandler sets the protocol handler on the Host's Mux.
  // This is equivalent to:
  //   host.Mux().SetHandler(proto, handler)
  // (Threadsafe)