Documentation
¶
Index ¶
- Variables
- func Ips() (map[string]string, error)
- type Bandwidth
- type Conn
- func (s *Conn) Close() (err error)
- func (s *Conn) IsClosed() bool
- func (s *Conn) LocalAddr() net.Addr
- func (s *Conn) Read(buf []byte) (n int, err error)
- func (s *Conn) RemoteAddr() net.Addr
- func (s *Conn) SetClosingFlag()
- func (s *Conn) SetDeadline(t time.Time) error
- func (s *Conn) SetPriority()
- func (s *Conn) SetReadDeadline(t time.Time) error
- func (s *Conn) SetWriteDeadline(t time.Time) error
- func (s *Conn) Write(buf []byte) (n int, err error)
- type ConnMap
- type Eth
- type FlushWriter
- type Mux
- type Rate
- type RateConn
- func (conn *RateConn) Close() error
- func (conn *RateConn) LocalAddr() net.Addr
- func (conn *RateConn) Read(b []byte) (n int, err error)
- func (conn *RateConn) RemoteAddr() net.Addr
- func (conn *RateConn) SetDeadline(t time.Time) error
- func (conn *RateConn) SetReadDeadline(t time.Time) error
- func (conn *RateConn) SetWriteDeadline(t time.Time) error
- func (conn *RateConn) Write(b []byte) (n int, err error)
- type TrafficControl
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PingInterval = 5 * time.Second PingJitter = 2 * time.Second PingMaxPad = 16 )
Functions ¶
Types ¶
type Bandwidth ¶
type Bandwidth struct {
// contains filtered or unexported fields
}
func NewBandwidth ¶
func (*Bandwidth) SetCopySize ¶
type Conn ¶
func (*Conn) RemoteAddr ¶
func (*Conn) SetClosingFlag ¶
func (s *Conn) SetClosingFlag()
func (*Conn) SetPriority ¶ added in v0.30.6
func (s *Conn) SetPriority()
type ConnMap ¶
type ConnMap struct {
//closeCh chan struct{}
sync.RWMutex
// contains filtered or unexported fields
}
func NewConnMap ¶
func NewConnMap() *ConnMap
type Eth ¶
func GetEthByIp ¶
GetEthByIp get ip and Eth information by Eth name
type FlushWriter ¶
type FlushWriter struct {
// contains filtered or unexported fields
}
func NewFlushWriter ¶
func NewFlushWriter(conn net.Conn) *FlushWriter
func (*FlushWriter) Close ¶
func (w *FlushWriter) Close() error
func (*FlushWriter) Flush ¶
func (w *FlushWriter) Flush() error
type Rate ¶
type Rate struct {
NowRate int64
// contains filtered or unexported fields
}
func (*Rate) ReturnBucket ¶
type RateConn ¶
type RateConn struct {
// contains filtered or unexported fields
}
func (*RateConn) RemoteAddr ¶
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
RunNetRangeTest test the network randomly
Click to show internal directories.
Click to hide internal directories.