tcpclient

package module
v0.0.0-...-b869fa8 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 5 Imported by: 0

README

xk6-tls-tcp

K6 extension to support TCP connection with TLS support

build

install xk6

go install go.k6.io/xk6/cmd/xk6@latest

build k6 with this extension

xk6 build master --with github.com/kagu2023/xk6-tls-tcp

run

Replace placeholders in examples/pop3.js

./k6.exe run examples/pop3.js

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TcpClient

type TcpClient struct{}

func (*TcpClient) Connect

func (client *TcpClient) Connect(insecureSkipVerify bool, addr string, enableReadCRLF bool) (*TcpConnection, error)

type TcpConnection

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

func NewTcpConnection

func NewTcpConnection(rawConn *tls.Conn, enableReadCRLF bool) *TcpConnection

func (*TcpConnection) Close

func (conn *TcpConnection) Close() error

func (*TcpConnection) Read

func (conn *TcpConnection) Read(data []byte) (int, error)

func (*TcpConnection) ReadCRLine

func (conn *TcpConnection) ReadCRLine() (string, error)

func (*TcpConnection) ReadLine

func (conn *TcpConnection) ReadLine() (string, error)

func (*TcpConnection) Write

func (conn *TcpConnection) Write(data []byte) error

func (*TcpConnection) WriteStringCRLine

func (conn *TcpConnection) WriteStringCRLine(str string) (int, error)

Jump to

Keyboard shortcuts

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