manconn

package module
v0.0.0-...-601aaa7 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MSS = 1500
View Source
const STREAM_ID_LENGTH = 8
View Source
const WAIT_FOR_PAIR_TIME = time.Second * 5

Variables

This section is empty.

Functions

func DialConnPair

func DialConnPair(dispatcherAddr, cmdAddr string, latency LatencyAdder) ([2]net.Conn, string, error)

Types

type ConnConfig

type ConnConfig struct {
	Latency LatencyConfig
}

type DelayConfig

type DelayConfig interface {
	NextDelay() time.Duration
}

type Dispatcher

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

func NewDispatcher

func NewDispatcher() *Dispatcher

type DummyLatencyAdder

type DummyLatencyAdder struct {
	Latency time.Duration
}

func (*DummyLatencyAdder) Next

func (la *DummyLatencyAdder) Next() time.Duration

type LatencyAdder

type LatencyAdder interface {
	Next() time.Duration
}

type LatencyConfig

type LatencyConfig struct {
	Sid    string
	Type   string
	Config interface{}
}

type LongTimeDelay

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

func (*LongTimeDelay) NextDelay

func (delay *LongTimeDelay) NextDelay() time.Duration

type ProbabilityDelay

type ProbabilityDelay struct {
}

type Response

type Response struct {
	Success bool
	Err     string
}

type TimeRangeLatencyAdder

type TimeRangeLatencyAdder struct {
	Old   time.Duration
	Range time.Duration
	New   time.Duration
	// contains filtered or unexported fields
}

func NewTimeRangeLatencyAdder

func NewTimeRangeLatencyAdder(o, r, n time.Duration) *TimeRangeLatencyAdder

func (*TimeRangeLatencyAdder) Next

func (la *TimeRangeLatencyAdder) Next() time.Duration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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