Documentation ¶
Index ¶
Constants ¶
View Source
const ( ExtensionBitDht = 0 // http://www.bittorrent.org/beps/bep_0005.html ExtensionBitFast = 2 // http://www.bittorrent.org/beps/bep_0006.html ExtensionBitV2 = 7 // "Hybrid torrent legacy to v2 upgrade" ExtensionBitAzureusExtensionNegotiation1 = 16 ExtensionBitAzureusExtensionNegotiation2 = 17 ExtensionBitLtep = 20 // LibTorrent Extension Protocol, http://www.bittorrent.org/beps/bep_0010.html ExtensionBitLocationAwareProtocol = 43 // https://wiki.theory.org/BitTorrent_Location-aware_Protocol_1 ExtensionBitAzureusMessagingProtocol = 63 // https://www.bittorrent.org/beps/bep_0004.html )
https://www.bittorrent.org/beps/bep_0004.html https://wiki.theory.org/BitTorrentSpecification.html#Reserved_Bytes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
func NewDefaultConfig ¶
func NewDefaultConfig() Config
type ExtensionBit ¶
type ExtensionBit uint
type HandshakeInfo ¶
type HandshakeInfo struct { PeerID protocol.ID PeerExtensionBits PeerExtensionBits }
type PeerExtensionBits ¶
type PeerExtensionBits [8]byte
func NewPeerExtensionBits ¶
func NewPeerExtensionBits(bits ...ExtensionBit) (ret PeerExtensionBits)
func (PeerExtensionBits) GetBit ¶
func (pex PeerExtensionBits) GetBit(bit ExtensionBit) bool
func (PeerExtensionBits) WithBit ¶
func (pex PeerExtensionBits) WithBit(bit ExtensionBit, on bool) PeerExtensionBits
type Response ¶
type Response struct { HandshakeInfo Info metainfo.Info }
type Result ¶
type Result struct { fx.Out Requester Requester RequestDuration prometheus.Collector `group:"prometheus_collectors"` RequestSuccessTotal prometheus.Collector `group:"prometheus_collectors"` RequestErrorTotal prometheus.Collector `group:"prometheus_collectors"` RequestConcurrency prometheus.Collector `group:"prometheus_collectors"` }
Click to show internal directories.
Click to hide internal directories.