```
func StreamFile(c *gin.Context) {
	var hf hashWithFile
	c.ShouldBind(&hf)

	log.Println("parts: ", hf)
	if hf.Hash == "" {
		http.Error(c.Writer, "404 Not Found", http.StatusNotFound)
		return
	}
	app := client.GetApp()
	t := app.GetTorrent(hf.Hash)
	<-t.GotInfo()
	if t.Info() == nil {
		http.Error(c.Writer, "Metainfo not yet loaded", http.StatusNotFound)
		return
	}

	// Get File from Given Torrent
	reqpath := hf.File
	var f *torrent.File
	for _, file := range t.Files() {
		log.Println("hf file: ", hf.File, "tfile:", file.Path())
		if file.Path() == reqpath {
			f = file
			break
		}
	}
	if f == nil {
		http.Error(c.Writer, "404 Not Found", http.StatusNotFound)
		return
	}
	filereader := f.NewReader()
	defer filereader.Close()
	filereader.SetReadahead(48 << 20)
	http.ServeContent(c.Writer, c.Request, reqpath, time.Time{}, filereader)
}
```
上面是我的golang 项目中通过magnet和file 获取torrent client 以及对应的torrent 然后缓冲文件的代码，其中client 对应的代码如下
```
package client

import (
	"context"
	"encoding/json"
	"log"
	"net"
	"os"
	"sync"
	tracker "torrent-player/Tracker"

	"github.com/anacrolix/dht/v2"
	"github.com/anacrolix/dht/v2/int160"
	peer_store "github.com/anacrolix/dht/v2/peer-store"
	"github.com/anacrolix/torrent"
)

// app 结构体，包含一个torrent客户端，一个用于存储torrents的map，以及一个互斥锁
type App struct {
	Client   *torrent.Client
	torrents map[string]*torrent.Torrent
	mu       sync.Mutex
}

// GetTorrent 通过hash查找并返回对应的torrent.Torrent对象
func (a *App) GetTorrent(hash string) *torrent.Torrent {
	a.mu.Lock()         // 加锁
	defer a.mu.Unlock() // 使用defer确保解锁
	torrent, ok := a.torrents[hash]
	if ok {
		return torrent
	}
	return nil
}

// AddTorrent 向app中添加一个新的torrent
func (a *App) AddTorrent(hash string, torrent *torrent.Torrent) {
	a.mu.Lock()         // 加锁
	defer a.mu.Unlock() // 解锁

	tracker := tracker.NewTracker("./File/tracker.txt")
	torrent.AddTrackers(tracker.GetTrackerList())
	log.Println("add hash to app: ", hash)
	a.torrents[hash] = torrent
}

var flags = struct {
	TorrentAddr        string `default:":42069" help:"Torrent client address"`
	PublicIp4          net.IP `help:"Public IPv4 address"`
	PublicIp6          net.IP `help:"Public IPv6 address"`
	Seed               bool   `help:"Seed data"`
	UPnPPortForwarding bool   `help:"Port forward via UPnP"`
	Dht                bool
	DisableTrackers    bool `help:"Disables all trackers"`
	TcpPeers           bool `help:"Allow TCP peers"`
	UtpPeers           bool `help:"Allow uTP peers"`
	Pex                bool
}{
	TorrentAddr: ":42069",
	Dht:         true,
	TcpPeers:    true,
	UtpPeers:    true,
	Pex:         true,
}

func newTorrentClient(ctx context.Context) (*torrent.Client, error) {

	cfg := torrent.NewDefaultClientConfig()
	cfg.DataDir = "./torrents"
	cfg.DisableTCP = !flags.TcpPeers
	cfg.DisableUTP = !flags.UtpPeers
	cfg.Seed = flags.Seed
	cfg.NoDefaultPortForwarding = !flags.UPnPPortForwarding
	cfg.NoDHT = !flags.Dht
	cfg.DisableTrackers = flags.DisableTrackers
	cfg.SetListenAddr(flags.TorrentAddr)
	cfg.DisablePEX = !flags.Pex

	cfg.ConfigureAnacrolixDhtServer = func(cfg *dht.ServerConfig) {
		cfg.InitNodeId()
		if cfg.PeerStore == nil {
			cfg.PeerStore = &peer_store.InMemory{
				RootId: int160.FromByteArray(cfg.NodeId),
			}
		}
	}

	return torrent.NewClient(cfg)
}

var app *App
var appOnce sync.Once

func LoadDhtNodes(filename string) ([]torrent.DhtServer, error) {
	data, err := os.ReadFile(filename)
	if err != nil {
		return nil, err
	}
	var dhts []torrent.DhtServer
	err = json.Unmarshal(data, &dhts)
	if err != nil {
		return nil, err
	}
	return dhts, nil
}

func GetApp() *App {
	appOnce.Do(func() {

		ctx := context.Background()

		// 创建 torrent 客户端
		tc, err := newTorrentClient(ctx)
		if err != nil {
			log.Fatalf("error creating torrent client: %v", err)
		}
		// dhts, _ := LoadDhtNodes("./File/dht.json")
		// for _, dht := range dhts {
		// 	tc.AddDhtServer(dht)
		// }

		log.Println("Torrent client successfully created")
		app = &App{
			Client:   tc,
			torrents: make(map[string]*torrent.Torrent),
		}
	})
	return app
}

```
现在我像让缓冲文件的速度加快，我想用多个协程进行同时缓冲然后返回给用户，我要怎么修改我上面的代码。请你给出一个有效的解决方案