Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnouncePolicy ¶
type AnnouncingFunction ¶
type AnnouncingFunction = func(TrackerAnnounceRequest)
type Factory ¶
type Factory interface { // CreateTorrent create a Torrent. announceList might have been shuffled CreateTorrent(meta metainfo.MetaInfo, announcePolicy AnnouncePolicy) (Torrent, error) }
type FactoryImpl ¶
type FactoryImpl struct { }
func (FactoryImpl) CreateTorrent ¶
func (f FactoryImpl) CreateTorrent(meta metainfo.MetaInfo, announcePolicy AnnouncePolicy) (Torrent, error)
type Torrent ¶
type Torrent interface { InfoHash() libtorrent.InfoHash Name() string GetPeers() Peers // AnnounceStop unconditionally send Stop event to all tracker currently in use AnnounceStop(announcingFunction AnnouncingFunction) // AnnounceToReadyTrackers announce to all tracker that are ready to receive an announce AnnounceToReadyTrackers(announcingFunction AnnouncingFunction) // HandleAnnounceSuccess delegate the handling of the response to the trackers HandleAnnounceSuccess(response TrackerAnnounceResponse) // HandleAnnounceError delegate the handling of the response to the trackers HandleAnnounceError(response TrackerAnnounceResponseError) }
type TrackerAnnounceRequest ¶
type TrackerAnnounceRequest struct { InfoHash libtorrent.InfoHash Event libtracker.AnnounceEvent Url url.URL Uploaded int64 Downloaded int64 Left int64 Corrupt int64 Private bool }
type TrackerAnnounceResponse ¶
type TrackerAnnounceResponse struct { Request TrackerAnnounceRequest Interval time.Duration Seeders int32 Leechers int32 }
type TrackerAnnounceResponseError ¶
type TrackerAnnounceResponseError struct { Error error Request TrackerAnnounceRequest }
Click to show internal directories.
Click to hide internal directories.