github.com/anacrolix/torrent@v1.61.0/deprecated.go (about) 1 package torrent 2 3 import ( 4 "github.com/anacrolix/torrent/webseed" 5 ) 6 7 // Deprecated: The names doesn't reflect the actual behaviour. You can only add sources. Use 8 // AddSources instead. 9 func (t *Torrent) UseSources(sources []string) { 10 t.AddSources(sources) 11 } 12 13 // Deprecated: Max requests are done Client-wide by host or cost-function applied to the webseed 14 // URL. Max concurrent requests to a WebSeed for a given torrent. This could easily be reimplemented 15 // by not assigning requests to a (Torrent, webseed URL) tuple keyed component in the webseed plan. 16 func WebSeedTorrentMaxRequests(maxRequests int) AddWebSeedsOpt { 17 return func(c *webseed.Client) { 18 c.MaxRequests = maxRequests 19 } 20 }