testutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testutil implements a number of test structs and functions used in unit-tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UDPEchoServer

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

UDPEchoServer is a test UDP pipe that accepts incoming connections and saves the information that it has received.

func (*UDPEchoServer) Addr

func (s *UDPEchoServer) Addr() (str string)

Addr returns the address the pipe listens to.

func (*UDPEchoServer) Close

func (s *UDPEchoServer) Close() (err error)

Close implements the io.Closer interface for *UDPEchoServer.

func (*UDPEchoServer) ReceivedMsg

func (s *UDPEchoServer) ReceivedMsg(num int) (b []byte)

ReceivedMsg returns the message received with the specified number of nil if there are no. Messages numbers start with 0.

func (*UDPEchoServer) Start

func (s *UDPEchoServer) Start() (err error)

Start starts the echo pipe.

Jump to

Keyboard shortcuts

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