Versions in this module Expand all Collapse all v1 v1.18.0 Jan 8, 2025 Changes in this version + type Manager struct + var DefaultManager *Manager + func (m *Manager) Join(c tracker) + func (m *Manager) Leave(c tracker) + func (m *Manager) Now() (up int64, down int64) + func (m *Manager) PushDownloaded(size int64) + func (m *Manager) PushUploaded(size int64) + func (m *Manager) ResetStatistic() + func (m *Manager) Snapshot() *Snapshot + type Snapshot struct + Connections []tracker + DownloadTotal int64 + UploadTotal int64 + type TcpTracker struct + func NewTCPTracker(conn C.Conn, manager *Manager, metadata *C.Metadata, rule C.Rule) *TcpTracker + func (tt *TcpTracker) Close() error + func (tt *TcpTracker) ID() string + func (tt *TcpTracker) Read(b []byte) (int, error) + func (tt *TcpTracker) Write(b []byte) (int, error) + type UdpTracker struct + func NewUDPTracker(conn C.PacketConn, manager *Manager, metadata *C.Metadata, rule C.Rule) *UdpTracker + func (ut *UdpTracker) Close() error + func (ut *UdpTracker) ID() string + func (ut *UdpTracker) ReadFrom(b []byte) (int, net.Addr, error) + func (ut *UdpTracker) WriteTo(b []byte, addr net.Addr) (int, error)