cmd/torrentfs: Expose readahead bytes as a flag

This commit is contained in:
Matt Joiner 2014-06-26 01:37:00 +10:00
parent c509f0b1ea
commit 809aabe531
1 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ var (
disableTrackers = flag.Bool("disableTrackers", false, "disables trackers")
testPeer = flag.String("testPeer", "", "the address for a test peer")
pprofAddr = flag.String("pprofAddr", "", "pprof HTTP server bind address")
readaheadBytes = flag.Int("readaheadBytes", 10*1024*1024, "bytes to readahead in each torrent from the last read piece")
testPeerAddr *net.TCPAddr
)
@ -133,7 +134,7 @@ func main() {
client := &torrent.Client{
DataDir: downloadDir,
DisableTrackers: *disableTrackers,
DownloadStrategy: &torrent.ResponsiveDownloadStrategy{2 * 1000 * 1024},
DownloadStrategy: &torrent.ResponsiveDownloadStrategy{*readaheadBytes},
}
client.Start()
addTorrentDir(client, torrentPath)