Documentation ¶
Index ¶
- func NewTCPTracker(conn C.Conn, manager *Manager, metadata *C.Metadata, rule C.Rule) *tcpTracker
- func NewUDPTracker(conn C.PacketConn, manager *Manager, metadata *C.Metadata, rule C.Rule) *udpTracker
- type 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
- func (m *Manager) Total() (up, down int64)
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTCPTracker ¶
func NewUDPTracker ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
var DefaultManager *Manager
func (*Manager) PushDownloaded ¶
func (*Manager) PushUploaded ¶
func (*Manager) ResetStatistic ¶
func (m *Manager) ResetStatistic()
Click to show internal directories.
Click to hide internal directories.