"net"
"github.com/anacrolix/dht/v2/krpc"
+
"github.com/anacrolix/torrent/peer_protocol"
)
import (
"github.com/anacrolix/dht/v2/krpc"
+
"github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/tracker"
)
"testing"
"github.com/anacrolix/dht/v2/krpc"
- "github.com/anacrolix/torrent/bencode"
"github.com/bradfitz/iter"
+
+ "github.com/anacrolix/torrent/bencode"
)
func marshalAndUnmarshal(tb testing.TB, orig krpc.Msg) (ret krpc.Msg) {
"github.com/anacrolix/missinggo/pubsub"
"github.com/anacrolix/missinggo/slices"
"github.com/anacrolix/sync"
+ "github.com/davecgh/go-spew/spew"
+ "github.com/dustin/go-humanize"
+ "github.com/google/btree"
+ "golang.org/x/time/rate"
+ "golang.org/x/xerrors"
+
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/iplist"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/mse"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/storage"
- "github.com/davecgh/go-spew/spew"
- "github.com/dustin/go-humanize"
- "github.com/google/btree"
- "golang.org/x/time/rate"
- "golang.org/x/xerrors"
)
// Clients contain zero or more Torrents. A Client manages a blocklist, the
_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/missinggo"
"github.com/anacrolix/missinggo/filecache"
+
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/iplist"
_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/tagflag"
+
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/bencode"
)
"os"
"github.com/anacrolix/tagflag"
+
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/metainfo"
)
"log"
"github.com/anacrolix/tagflag"
+
"github.com/anacrolix/torrent/metainfo"
)
"os"
"github.com/anacrolix/tagflag"
+
"github.com/anacrolix/torrent/metainfo"
)
"github.com/anacrolix/envpprof"
"github.com/anacrolix/tagflag"
- "github.com/anacrolix/torrent/metainfo"
"github.com/bradfitz/iter"
+
+ "github.com/anacrolix/torrent/metainfo"
)
var flags struct {
"time"
_ "github.com/anacrolix/envpprof"
- "github.com/anacrolix/torrent"
- "github.com/anacrolix/torrent/metainfo"
"github.com/dustin/go-humanize"
"github.com/jessevdk/go-flags"
+
+ "github.com/anacrolix/torrent"
+ "github.com/anacrolix/torrent/metainfo"
)
// fmt.Fprintf(os.Stderr, "Usage: %s \n", os.Args[0])
"path/filepath"
"github.com/anacrolix/tagflag"
- "github.com/anacrolix/torrent/metainfo"
- "github.com/anacrolix/torrent/mmap_span"
"github.com/bradfitz/iter"
"github.com/edsrzf/mmap-go"
+
+ "github.com/anacrolix/torrent/metainfo"
+ "github.com/anacrolix/torrent/mmap_span"
)
func mmapFile(name string) (mm mmap.MMap, err error) {
"github.com/anacrolix/envpprof"
"github.com/anacrolix/tagflag"
+ humanize "github.com/dustin/go-humanize"
+ "github.com/gosuri/uiprogress"
+ "golang.org/x/time/rate"
+
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/iplist"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/storage"
- humanize "github.com/dustin/go-humanize"
- "github.com/gosuri/uiprogress"
- "golang.org/x/time/rate"
)
var progress = uiprogress.New()
fusefs "bazil.org/fuse/fs"
_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/tagflag"
+
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/fs"
"github.com/anacrolix/torrent/util/dirwatch"
"github.com/davecgh/go-spew/spew"
"github.com/anacrolix/tagflag"
+
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/tracker"
"github.com/anacrolix/missinggo"
"github.com/anacrolix/missinggo/conntrack"
"github.com/anacrolix/missinggo/expect"
+ "golang.org/x/time/rate"
+
"github.com/anacrolix/torrent/iplist"
"github.com/anacrolix/torrent/mse"
"github.com/anacrolix/torrent/storage"
- "golang.org/x/time/rate"
)
var DefaultHTTPUserAgent = "Go-Torrent/1.0"
package torrent
import (
+ "encoding/json"
"fmt"
"io"
"reflect"
"sync/atomic"
- "encoding/json"
pp "github.com/anacrolix/torrent/peer_protocol"
)
"github.com/anacrolix/missinggo/bitmap"
"github.com/anacrolix/missinggo/iter"
"github.com/anacrolix/missinggo/prioritybitmap"
+ "github.com/pkg/errors"
+
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/mse"
pp "github.com/anacrolix/torrent/peer_protocol"
- "github.com/pkg/errors"
)
type peerSource string
"time"
"github.com/anacrolix/missinggo/pubsub"
+ "github.com/bradfitz/iter"
+ "github.com/stretchr/testify/require"
+
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/storage"
- "github.com/bradfitz/iter"
- "github.com/stretchr/testify/require"
)
// Ensure that no race exists between sending a bitfield, and a subsequent
"bazil.org/fuse"
"bazil.org/fuse/fs"
"github.com/anacrolix/missinggo"
+
"github.com/anacrolix/torrent"
)
"bazil.org/fuse"
fusefs "bazil.org/fuse/fs"
+
"github.com/anacrolix/torrent"
)
"bazil.org/fuse"
fusefs "bazil.org/fuse/fs"
+
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/metainfo"
)
fusefs "bazil.org/fuse/fs"
_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/missinggo"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/storage"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
)
func init() {
"strings"
"github.com/anacrolix/missinggo/expect"
+
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/metainfo"
)
"os"
"github.com/anacrolix/tagflag"
+
"github.com/anacrolix/torrent/iplist"
)
"github.com/anacrolix/missinggo"
"github.com/anacrolix/tagflag"
+
"github.com/anacrolix/torrent/iplist"
)
"io/ioutil"
"testing"
- "github.com/anacrolix/torrent/internal/testutil"
- "github.com/anacrolix/torrent/storage"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/time/rate"
+
+ "github.com/anacrolix/torrent/internal/testutil"
+ "github.com/anacrolix/torrent/storage"
)
func TestDropTorrentWithMmapStorageWhileHashing(t *testing.T) {
"os"
"testing"
+ "github.com/stretchr/testify/require"
+
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/storage"
- "github.com/stretchr/testify/require"
)
func TestHashPieceAfterStorageClosed(t *testing.T) {
import (
"testing"
- "github.com/anacrolix/torrent/bencode"
"github.com/stretchr/testify/assert"
+
+ "github.com/anacrolix/torrent/bencode"
)
func TestMarshalInfo(t *testing.T) {
"testing"
"github.com/anacrolix/missinggo"
- "github.com/anacrolix/torrent/bencode"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/bencode"
)
func testFile(t *testing.T, filename string) {
"bytes"
"testing"
- "github.com/anacrolix/torrent/bencode"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/bencode"
)
func testFileNodesMatch(t *testing.T, file string, nodes []Node) {
"net"
"github.com/anacrolix/missinggo"
+ "golang.org/x/time/rate"
+
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
- "golang.org/x/time/rate"
)
type chunkSpec struct {
"golang.org/x/xerrors"
"github.com/anacrolix/missinggo"
+
"github.com/anacrolix/torrent/metainfo"
)
import (
"testing"
- "github.com/anacrolix/torrent/bencode"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/bencode"
)
func TestUnmarshalPex(t *testing.T) {
"testing"
"time"
- "github.com/anacrolix/torrent/internal/testutil"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/internal/testutil"
)
func TestReaderReadContext(t *testing.T) {
"path/filepath"
"time"
- "github.com/anacrolix/torrent/metainfo"
"github.com/boltdb/bolt"
+
+ "github.com/anacrolix/torrent/metainfo"
)
const (
"encoding/binary"
"github.com/anacrolix/missinggo/x"
- "github.com/anacrolix/torrent/metainfo"
"github.com/boltdb/bolt"
+
+ "github.com/anacrolix/torrent/metainfo"
)
type boltDBPiece struct {
"time"
"github.com/anacrolix/missinggo/expect"
- "github.com/anacrolix/torrent/metainfo"
"github.com/boltdb/bolt"
+
+ "github.com/anacrolix/torrent/metainfo"
)
const (
"os"
"testing"
- "github.com/anacrolix/torrent/metainfo"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/metainfo"
)
func TestBoltPieceCompletion(t *testing.T) {
"path/filepath"
"github.com/anacrolix/missinggo"
+
"github.com/anacrolix/torrent/metainfo"
)
import (
"testing"
- "github.com/anacrolix/torrent/metainfo"
"github.com/stretchr/testify/assert"
+
+ "github.com/anacrolix/torrent/metainfo"
)
func TestExtentCompleteRequiredLengths(t *testing.T) {
"testing"
"github.com/anacrolix/missinggo"
- "github.com/anacrolix/torrent/metainfo"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/metainfo"
)
func TestShortFile(t *testing.T) {
"testing"
"github.com/anacrolix/missinggo/resource"
- "github.com/anacrolix/torrent/metainfo"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/metainfo"
)
// Two different torrents opened from the same storage. Closing one should not
"os"
"testing"
- "github.com/anacrolix/torrent/metainfo"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/metainfo"
)
func testMarkedCompleteMissingOnRead(t *testing.T, csf func(string) ClientImpl) {
"path/filepath"
"github.com/anacrolix/missinggo"
+ "github.com/edsrzf/mmap-go"
+
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/mmap_span"
- "github.com/edsrzf/mmap-go"
)
type mmapClientImpl struct {
"path"
"github.com/anacrolix/missinggo/resource"
+
"github.com/anacrolix/torrent/metainfo"
)
"database/sql"
"path/filepath"
- "github.com/anacrolix/torrent/metainfo"
_ "github.com/mattn/go-sqlite3"
+
+ "github.com/anacrolix/torrent/metainfo"
)
type sqlitePieceCompletion struct {
"os"
"github.com/anacrolix/missinggo"
+
"github.com/anacrolix/torrent/metainfo"
)
"strings"
"github.com/anacrolix/missinggo/pubsub"
+
"github.com/anacrolix/torrent/metainfo"
)
"github.com/anacrolix/missinggo/prioritybitmap"
"github.com/anacrolix/missinggo/pubsub"
"github.com/anacrolix/missinggo/slices"
+
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
"testing"
"github.com/anacrolix/missinggo"
+ "github.com/bradfitz/iter"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/storage"
- "github.com/bradfitz/iter"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
)
func r(i, b, l pp.Integer) request {
"github.com/anacrolix/dht/v2/krpc"
"github.com/anacrolix/missinggo/httptoo"
+
"github.com/anacrolix/torrent/bencode"
)
import (
"testing"
- "github.com/anacrolix/torrent/bencode"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+
+ "github.com/anacrolix/torrent/bencode"
)
var defaultHTTPUserAgent = "Go-Torrent"
"time"
"github.com/anacrolix/dht/v2/krpc"
+
"github.com/anacrolix/torrent/tracker"
)
"strings"
"github.com/anacrolix/missinggo"
- "github.com/anacrolix/torrent/metainfo"
"github.com/fsnotify/fsnotify"
+
+ "github.com/anacrolix/torrent/metainfo"
)
type Change uint