udp

package
v0.0.0-...-4b634d0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MaxResponseSize = 2048

MaxResponseSize is the max response size for UDP test.

Variables

View Source
var ErrInvalidType = errors.New("invalid type")

ErrInvalidType is raised when object type mismatch.

Functions

func CreateExecutor

func CreateExecutor(timeout time.Duration, validator ResponseValidator, hosts ...string) bender.RequestExecutor

CreateExecutor creates a new UDP RequestExecutor.

Types

type Datagram

type Datagram struct {
	Port int
	Data []byte
}

Datagram represents a udp datagram to be sent.

type ResponseValidator

type ResponseValidator func(request *Datagram, response []byte) error

ResponseValidator validates a udp response.

Jump to

Keyboard shortcuts

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