Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnounceRequest ¶
type AnnounceRequest struct { ConnectionID uint64 Action Action TransactionID uint32 InfoHash [20]byte PeerID [20]byte Downloaded uint64 Left uint64 Uploaded uint64 Event Event IP uint32 Key uint32 NumWant uint32 Port uint16 }
func (*AnnounceRequest) Bytes ¶
func (r *AnnounceRequest) Bytes() ([]byte, error)
type AnnounceResponse ¶
type ConnectRequest ¶
func (ConnectRequest) Bytes ¶
func (request ConnectRequest) Bytes() []byte
type ConnectResponse ¶
type HTTPGetter ¶
type HTTPGetter struct {
// contains filtered or unexported fields
}
type PeersGetter ¶
type PeersGetter interface {
GetPeers(announce string, metafile models.Metafile) ([]models.Peer, error)
}
func NewHTTPGetter ¶
func NewHTTPGetter(client *http.Client, peerID string) PeersGetter
func NewUDPGetter ¶
func NewUDPGetter(peerID string) PeersGetter
Click to show internal directories.
Click to hide internal directories.