Skip to content
This repository was archived by the owner on Mar 30, 2026. It is now read-only.

hoprnet/xk6-udp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xk6-udp

A k6 extension for sending strings to UDP port

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/amitmankikar/xk6-udp

Example

import udp from 'k6/x/udp';
import { check } from 'k6';

const conn = udp.connect('host:port');

export default function () {
  udp.writeLn(conn, 'Say Hello');
  let res = String.fromCharCode(...udp.read(conn, 1024))
  check (res, {
    'verify ag tag': (res) => res.includes('Hello')
  });
  udp.close(conn);
}

About

A k6 extension for sending data to UDP port

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 57.8%
  • Go 42.2%