stats

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSessionConn added in v1.18.0

func NewSessionConn(conn net.Conn, session *Session) net.Conn

func NewSessionPacketConn added in v1.18.0

func NewSessionPacketConn(conn net.PacketConn, session *Session) net.PacketConn

Types

type Session

type Session struct {
	ProcessName   string
	Network       string
	DialerAddr    string
	ClientAddr    string
	TargetAddr    string
	UploadBytes   int64
	DownloadBytes int64
	SessionStart  time.Time
	SessionClose  time.Time
}

type SessionConn added in v1.18.0

type SessionConn struct {
	net.Conn
	*Session
	// contains filtered or unexported fields
}

Track SessionConn

func (*SessionConn) Close added in v1.18.0

func (c *SessionConn) Close() error

func (*SessionConn) Read added in v1.18.0

func (c *SessionConn) Read(b []byte) (n int, err error)

func (*SessionConn) Write added in v1.18.0

func (c *SessionConn) Write(b []byte) (n int, err error)

type SessionPacketConn added in v1.18.0

type SessionPacketConn struct {
	net.PacketConn
	*Session
	// contains filtered or unexported fields
}

Track SessionPacketConn

func (*SessionPacketConn) Close added in v1.18.0

func (c *SessionPacketConn) Close() error

func (*SessionPacketConn) ReadFrom added in v1.18.0

func (c *SessionPacketConn) ReadFrom(b []byte) (n int, addr net.Addr, err error)

func (*SessionPacketConn) WriteTo added in v1.18.0

func (c *SessionPacketConn) WriteTo(b []byte, addr net.Addr) (n int, err error)

type SessionStater

type SessionStater interface {
	Start() error
	Stop() error
	AddSession(key interface{}, session *Session)
	GetSession(key interface{}) *Session
	RemoveSession(key interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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