Documentation ¶
Index ¶
- type Manager
- func (m *Manager) CloseAllConnections()
- func (m *Manager) Connections() []tracker
- func (m *Manager) GetTotal() *Total
- func (m *Manager) Join(c tracker)
- func (m *Manager) Leave(c tracker)
- func (m *Manager) Now(rule constants.IpRule) (up int64, down int64)
- func (m *Manager) PushDownloaded(size int64, rule constants.IpRule)
- func (m *Manager) PushUploaded(size int64, rule constants.IpRule)
- func (m *Manager) ResetStatistic(rule constants.IpRule)
- type SnapshotStatistic
- type Statistic
- type TcpTracker
- type Total
- type UdpTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
var DefaultManager *Manager
func (*Manager) CloseAllConnections ¶
func (m *Manager) CloseAllConnections()
func (*Manager) Connections ¶
func (m *Manager) Connections() []tracker
func (*Manager) PushDownloaded ¶
func (*Manager) ResetStatistic ¶
type SnapshotStatistic ¶
type TcpTracker ¶
func NewTCPTracker ¶
func (*TcpTracker) Close ¶
func (tt *TcpTracker) Close() error
func (*TcpTracker) ID ¶
func (tt *TcpTracker) ID() string
type Total ¶
type Total struct { Proxy SnapshotStatistic `json:"proxy"` Direct SnapshotStatistic `json:"direct"` }
type UdpTracker ¶
type UdpTracker struct { net.PacketConn `json:"-"` // contains filtered or unexported fields }
func NewUDPTracker ¶
func NewUDPTracker(conn net.PacketConn, manager *Manager, metadata *C.Metadata, rule constants.IpRule) *UdpTracker
func (*UdpTracker) Close ¶
func (ut *UdpTracker) Close() error
func (*UdpTracker) ID ¶
func (ut *UdpTracker) ID() string
Click to show internal directories.
Click to hide internal directories.