udp

package module
v0.0.0-...-8bee4fa Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 3 Imported by: 0

README

xk6-udp

A k6 extension for sending datagrams for udp protocol like the one for tcp

Build

To build a k6 binary with this plugin, first ensure you have the prerequisites:

Then:

  1. Install xk6:
go install github.com/k6io/xk6/cmd/xk6@latest
  1. Build the binary:
xk6 build master \
  --with github.com/pedrosaraiva/xk6-udp
  1. Execute k6:
./k6 run examples/udp.ts

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UDP

type UDP struct{}

func (*UDP) Close

func (udp *UDP) Close(conn net.Conn) error

func (*UDP) Connect

func (udp *UDP) Connect(addr string) (net.Conn, error)

func (*UDP) Read

func (udp *UDP) Read(conn net.Conn, size int, readTimeout time.Duration) ([]byte, error)

func (*UDP) Write

func (udp *UDP) Write(conn net.Conn, data []byte, writeTimeout time.Duration) error

func (*UDP) WriteLn

func (udp *UDP) WriteLn(conn net.Conn, data []byte, writeTimeout time.Duration) error

Jump to

Keyboard shortcuts

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