netest

package module
v0.0.0-...-2217a4a Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2015 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Kilobyte = 1024.0
	Megabyte = 1048576.0
	Gigabyte = 1073741824.0
)

Variables

View Source
var MTU = 1500
View Source
var Patterns = [][]byte{
	[]byte{0xff},
	[]byte{0x00},
}

Functions

func Humanize

func Humanize(v float64) string

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

type Packet

type Packet struct {
	PacketHeader
	Payload []byte
}

type PacketHeader

type PacketHeader struct {
	Length   uint16
	Sequence uint16
}

type PatternType

type PatternType uint8
const (
	AllOnesPattern PatternType = iota
	AllZerosPattern
)

type Sink

type Sink struct {
	*Connection
	// contains filtered or unexported fields
}

func NewTCPSink

func NewTCPSink(laddr string) (*Sink, error)

func NewUDPSink

func NewUDPSink(laddr string) (*Sink, error)

func (*Sink) Close

func (s *Sink) Close()

func (*Sink) ReceiveMsg

func (s *Sink) ReceiveMsg() *Packet

type Source

type Source struct {
	*Connection
	// contains filtered or unexported fields
}

func NewTCPSource

func NewTCPSource(laddr, raddr string) (*Source, error)

func NewUDPSource

func NewUDPSource(laddr, raddr string) (*Source, error)

func (*Source) Close

func (s *Source) Close()

func (*Source) SendMsg

func (s *Source) SendMsg(payload []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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