webseed

package
v1.15.1-0...-8913225 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2020 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest(url string, fileIndex int, info *metainfo.Info, offset, length int64) (*http.Request, error)

Creates a request per BEP 19.

Types

type Client

type Client struct {
	HttpClient *http.Client
	Url        string
	FileIndex  segments.Index
	Info       *metainfo.Info
}

func (*Client) NewRequest

func (ws *Client) NewRequest(r RequestSpec) Request

type Request

type Request struct {
	Result chan RequestResult
	// contains filtered or unexported fields
}

func (Request) Cancel

func (r Request) Cancel()

type RequestResult

type RequestResult struct {
	Bytes []byte
	Err   error
}

type RequestSpec

type RequestSpec = segments.Extent

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL