tcp

package
v0.0.0-...-c2832fb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTCPBuffer = 128

Variables

View Source
var ErrNoAvailableHosts = errors.New("no available hosts")

Functions

This section is empty.

Types

type Recv

type Recv struct {
	Listen string `short:"l" long:"listen" description:"host:port to listen on"`
}

func (*Recv) Execute

func (r *Recv) Execute(args []string) error

type Send

type Send struct {
	Addr   string `short:"a" long:"addr" description:"Who to send the stream to"`
	Window int    `short:"w" long:"window" description:"Window size to use when transmitting"`
	Buffer int    `short:"b" long:"buffer" description:"How big of an internal buffer to use"`
}

func (*Send) Execute

func (s *Send) Execute(args []string) error

type TCPPlugin

type TCPPlugin struct {
	Address string `description:"host:port to listen (input) or send to (output)"`
}

func (*TCPPlugin) Description

func (t *TCPPlugin) Description() string

func (*TCPPlugin) Generator

func (r *TCPPlugin) Generator() (cypress.Generator, error)

func (*TCPPlugin) Receiver

func (r *TCPPlugin) Receiver() (cypress.Receiver, error)

type TCPRecv

type TCPRecv struct {
	Addr    string
	Handler cypress.GeneratorHandler
	// contains filtered or unexported fields
}

func NewTCPRecv

func NewTCPRecv(host string, h cypress.GeneratorHandler) (*TCPRecv, error)

func (*TCPRecv) Accept

func (t *TCPRecv) Accept() error

func (*TCPRecv) Close

func (t *TCPRecv) Close() error

func (*TCPRecv) Listen

func (t *TCPRecv) Listen() error

func (*TCPRecv) ListenAndAccept

func (t *TCPRecv) ListenAndAccept() error

type TCPRecvGenerator

type TCPRecvGenerator struct {
	*TCPRecv
	// contains filtered or unexported fields
}

func NewTCPRecvGenerator

func NewTCPRecvGenerator(host string) (*TCPRecvGenerator, error)

func (*TCPRecvGenerator) Close

func (t *TCPRecvGenerator) Close() error

func (*TCPRecvGenerator) Generate

func (t *TCPRecvGenerator) Generate() (*cypress.Message, error)

func (*TCPRecvGenerator) HandleGenerator

func (t *TCPRecvGenerator) HandleGenerator(g cypress.Generator)

func (*TCPRecvGenerator) Run

type TCPSend

type TCPSend struct {
	*cypress.ReliableSend
	// contains filtered or unexported fields
}

func NewTCPSend

func NewTCPSend(hosts []string, window, buffer int) (*TCPSend, error)

func (*TCPSend) Connect

func (t *TCPSend) Connect() (*cypress.Send, error)

Jump to

Keyboard shortcuts

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