Versions in this module Expand all Collapse all v1 v1.0.0 Aug 27, 2020 Changes in this version + const PieceChecking + const PieceComplete + const PieceEmpty + const PiecePartial + const PieceUnpended + const PieceWriting + const StatusChecking + const StatusDownloading + const StatusPaused + const StatusQueued + const StatusSeeding + const WEBSEED_BUF + const WEBSEED_CONCURENT + const WEBSEED_SPLIT + const WEBSEED_TIMEOUT + const WEBSEED_URL_CONCURENT + var ActiveCount = 3 + var Bep20 = "" + var BindAddr string = ":53007" + var CONTENT_RANGE = regexp.MustCompile("bytes (\\d+)-(\\d+)/(\\d+)") + var QueueTimeout = (30 * time.Minute).Nanoseconds() + var RefreshPort = (1 * time.Minute).Nanoseconds() + var SocketsPerTorrent int = 40 + var Version = "" + func AddMagnet(path string, magnet string) int + func AddTorrent(file string) int + func AddTorrentFromBytes(path string, buf []byte) int + func AddTorrentFromURL(path string, url string) int + func CheckTorrent(i int) + func Close() + func CloseMetaInfo() + func Count() int + func Create() bool + func CreateMetainfo(root string) int + func CreateMetainfoBuilder(b MetainfoBuilder) int + func CreateTorrentFile(root string) []byte + func CreateTorrentFileFromMetaInfo() []byte + func CreateTorrentFromMetaInfo() int + func DownloadMetadata(i int) bool + func Error() string + func GetTorrent(i int) []byte + func HashMetaInfo(piece int) bool + func ListenAddr() string + func LoadTorrent(path string, buf []byte) int + func MetaTorrent(i int) bool + func Pause() + func Paused() bool + func PendingCompleted(i int) bool + func Port(i int) string + func PortCheck() (bool, error) + func PortCount() int + func RemoveTorrent(i int) + func Resume() + func SaveTorrent(i int) []byte + func SetDefaultAnnouncesList(str string) + func SetDownloadRate(i int) + func SetUploadRate(i int) + func StartTorrent(i int) bool + func StopTorrent(i int) + func TorrentActive(i int) bool + func TorrentBytesCompleted(i int) int64 + func TorrentBytesLength(i int) int64 + func TorrentFileDeleteUnselected(i int) + func TorrentFileRename(i int, f int, n string) bool + func TorrentFilesCheck(i int, p int, b bool) + func TorrentFilesCheckAll(i int, b bool) + func TorrentFilesCheckFilter(i int, filter string, b bool) + func TorrentFilesCount(i int) int + func TorrentHash(i int) string + func TorrentInfoComment(i int, s string) + func TorrentInfoCreator(i int, s string) + func TorrentInfoName(i int, s string) + func TorrentMagnet(i int) string + func TorrentMetainfo(i int) *metainfo.MetaInfo + func TorrentName(i int) string + func TorrentPeersCount(i int) int + func TorrentPendingBytesCompleted(i int) int64 + func TorrentPendingBytesLength(i int) int64 + func TorrentPieceLength(i int) int64 + func TorrentPiecesCompact(i int, p int) int32 + func TorrentPiecesCompactCount(i int, size int) int + func TorrentPiecesCount(i int) int + func TorrentRename(i int, n string) bool + func TorrentSetName(i int, n string) + func TorrentStatus(i int) int32 + func TorrentStorageSet(p FileStorageTorrent) + func TorrentTrackerAdd(i int, addr string) + func TorrentTrackerRemove(i int, url string) + func TorrentTrackersCount(i int) int + func TorrentWebSeedsCount(i int) int + func WaitAll() bool + func WebSeedStart(t *torrent.Torrent) + type BodyReader struct + func (m *BodyReader) Read(b []byte) (int, error) + type Buffer struct + func (m *Buffer) Length() int + func (m *Buffer) Write(b []byte, pos int, len int) (int, error) + type BytesInfo struct + Downloaded int64 + Uploaded int64 + func Stats() *BytesInfo + type File struct + BytesCompleted int64 + Check bool + Length int64 + Path string + func TorrentFiles(i int, p int) *File + type FileStorageTorrent interface + ReadFileAt func(hash string, path string, buf *Buffer, off int64) (n int, err error) + Remove func(hash string, path string) error + Rename func(hash string, old string, path string) error + WriteFileAt func(hash string, path string, b []byte, off int64) (n int, err error) + type InfoTorrent struct + Comment string + CreateOn int64 + Creator string + DateAdded int64 + DateCompleted int64 + func TorrentInfo(i int) *InfoTorrent + type Int64Slice []int64 + func (p Int64Slice) Len() int + func (p Int64Slice) Less(i, j int) bool + func (p Int64Slice) Sort() + func (p Int64Slice) Swap(i, j int) + type LPDConn struct + func (m *LPDConn) Close() + type LPDServer struct + type MetainfoBuilder interface + FilesCount func() (int, error) + FilesLength func(i int) int64 + FilesName func(i int) string + Name func() string + ReadFileAt func(path string, buf *Buffer, off int64) (n int, err error) + Root func() string + type MultipartReader struct + func (m *MultipartReader) Read(b []byte) (int, error) + type Peer struct + Addr string + Downloaded int64 + Id [20]byte + Name string + PiecesCompleted int64 + Source string + SupportsEncryption bool + Uploaded int64 + func TorrentPeers(i int, p int) *Peer + type StatsTorrent struct + Downloaded int64 + Downloading int64 + Seeding int64 + Uploaded int64 + func TorrentStats(i int) *StatsTorrent + type TorrentState struct + AddedDate int64 + Checks []bool + Comment string + CompletedDate int64 + CreatedOn int64 + Creator string + Downloaded int64 + DownloadingTime int64 + InfoHash *metainfo.Hash + MetaInfo *metainfo.MetaInfo + Name string + Pieces []bool + Root string + SeedingTime int64 + Trackers [][]string + Uploaded int64 + UrlList metainfo.UrlList + Version int + type Tracker struct + Addr string + Downloaded int + Error string + LastAnnounce int64 + LastScrape int64 + Leechers int + NextAnnounce int64 + Peers int + Seeders int + func TorrentTrackers(i int, p int) *Tracker + type WebSeedUrl struct + Downloaded int64 + Error string + Url string + func TorrentWebSeeds(i int, p int) *WebSeedUrl