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.
Click to show internal directories.
Click to hide internal directories.