reader

package
v0.0.0-...-57789c7 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileEntry

type FileEntry struct {
	*torrent.File
	torrent.Reader
}

FileEntry helps reading a torrent file.

func (*FileEntry) Seek

func (f *FileEntry) Seek(offset int64, whence int) (int64, error)

Seek seeks to the correct file position, paying attention to the offset.

type SeekableContent

type SeekableContent interface {
	io.ReadSeeker
	io.Closer
}

SeekableContent describes an io.ReadSeeker that can be closed as well.

func NewFileReader

func NewFileReader(f *torrent.File) (SeekableContent, error)

NewFileReader sets up a torrent file for streaming reading.

Jump to

Keyboard shortcuts

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