statistics

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DownloadKey = []byte{'D', 'O', 'W', 'N', 'L', 'O', 'A', 'D'}
	UploadKey   = []byte{'U', 'P', 'L', 'O', 'A', 'D'}

	SyncThreshold int64 = 1024 * 1024 * 50 // bytes
)

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(cache *cache.Cache) *Cache

func (*Cache) AddDownload

func (c *Cache) AddDownload(d uint64)

func (*Cache) AddUpload

func (c *Cache) AddUpload(d uint64)

func (*Cache) Close

func (c *Cache) Close()

func (*Cache) LoadDownload

func (c *Cache) LoadDownload() uint64

func (*Cache) LoadUpload

func (c *Cache) LoadUpload() uint64

type Connections

type Connections struct {
	gs.UnimplementedConnectionsServer

	netapi.Proxy

	Cache *Cache
	// contains filtered or unexported fields
}

func NewConnStore

func NewConnStore(cache *cache.Cache, dialer netapi.Proxy, processDumper listener.ProcessDumper) *Connections

func (*Connections) Close

func (c *Connections) Close() error

func (*Connections) CloseConn

func (*Connections) Conn

func (c *Connections) Conn(ctx context.Context, addr netapi.Address) (net.Conn, error)

func (*Connections) Conns

func (*Connections) DumpProcess

func (c *Connections) DumpProcess(ctx context.Context, addr netapi.Address) (s string)

func (*Connections) Notify

func (*Connections) PacketConn

func (c *Connections) PacketConn(ctx context.Context, addr netapi.Address) (net.PacketConn, error)

func (*Connections) Remove

func (c *Connections) Remove(id uint64)

func (*Connections) Total

Jump to

Keyboard shortcuts

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