Documentation ¶
Index ¶
Constants ¶
View Source
const ( //Display Name is a filename to display to the user, for convenience DisplayName = "dn" //Exact Topic is a URN containing file hash ExactTopic = "xt" //Exact Source is a P2P link identified by a content-hash ExactSource = "xs" //Tracker URL address for Bittorrent downloads Tracker = "tr" //Web seed is the payload data served over https WebSeed = "ws" //Exact length is the size in bytes ExactLength = "xl" )
View Source
const ( // MaxBlockSize is the largest number of bytes a request can ask for MaxBlockSize = 16384 // MaxBacklog is the number of unfulfilled requests a client can have in its pipeline MaxBacklog = 5 )
View Source
const Port = 6881
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Magnet ¶
type Magnet struct { Origin string //original uri DisplayName string //dn Hash string //info hash Size int // size in bytes Xt string // exact topic Trackers []string //tr Source string Seed string Creation float64 PieceLen int Pieces int }
A Magnet represent the info present in a magnet URI.
func ParseMagnet ¶
Parse a magnet uri into a magnet struct
type Parselable ¶
Parselable represents a type that can perform the parse operation
Directories ¶
Path | Synopsis |
---|---|
All of the remaining messages in the protocol take the form of <length prefix><message ID><payload>.
|
All of the remaining messages in the protocol take the form of <length prefix><message ID><payload>. |
Click to show internal directories.
Click to hide internal directories.