Documentation ¶
Index ¶
- func Ips() (map[string]string, error)
- func NewBandwidth(fd *os.File) *bandwidth
- func NewConn(connId int32, mux *Mux) *conn
- func NewConnMap() *connMap
- type Conn
- func (conn *Conn) Close() error
- func (conn *Conn) LocalAddr() net.Addr
- func (conn *Conn) Read(b []byte) (n int, err error)
- func (conn *Conn) RemoteAddr() net.Addr
- func (conn *Conn) SetDeadline(t time.Time) error
- func (conn *Conn) SetReadDeadline(t time.Time) error
- func (conn *Conn) SetWriteDeadline(t time.Time) error
- func (conn *Conn) Write(b []byte) (n int, err error)
- type Eth
- type Mux
- type Rate
- type TrafficControl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBandwidth ¶
func NewConnMap ¶
func NewConnMap() *connMap
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) RemoteAddr ¶
type Eth ¶
func GetEthByIp ¶
get ip and Eth information by Eth name
type TrafficControl ¶
type TrafficControl struct { Eth *Eth // contains filtered or unexported fields }
func NewTrafficControl ¶
func NewTrafficControl(ipAddr string) (*TrafficControl, error)
func (*TrafficControl) Run ¶
func (tc *TrafficControl) Run() error
func (*TrafficControl) RunNetRangeTest ¶
func (tc *TrafficControl) RunNetRangeTest(f func()) error
test the network randomly
Click to show internal directories.
Click to hide internal directories.