Documentation ¶
Overview ¶
Package netutil implements network-related utility functions.
Index ¶
- func DropPort(port int) error
- func GetDefaultHost() (string, error)
- func GetDefaultInterface() (string, error)
- func IsNetworkTimeoutError(err error) bool
- func RecoverPort(port int) error
- func RemoveLatency() error
- func SetLatency(ms, rv int) error
- func URLStringsEqual(ctx context.Context, a []string, b []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropPort ¶
DropPort drops all tcp packets that are received from the given port and sent to the given port.
func GetDefaultHost ¶
func GetDefaultInterface ¶
func IsNetworkTimeoutError ¶
func RecoverPort ¶
RecoverPort stops dropping tcp packets at given port.
func SetLatency ¶
SetLatency adds latency in millisecond scale with random variations.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.