conn

package
v0.0.0-...-d30ddaf Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConn

type MockConn struct {
	WriteBuffered []byte
	Closed        bool

	MultiWrite bool
	// contains filtered or unexported fields
}

MockConn is a simple struct implementing net.Conn that allows us to read what was written to it and feed data it will read from

func (*MockConn) Close

func (m *MockConn) Close() error

func (MockConn) LocalAddr

func (m MockConn) LocalAddr() net.Addr

func (*MockConn) Read

func (m *MockConn) Read(p []byte) (n int, err error)

func (MockConn) RemoteAddr

func (m MockConn) RemoteAddr() net.Addr

func (MockConn) SetDeadline

func (m MockConn) SetDeadline(t time.Time) error

func (MockConn) SetReadDeadline

func (m MockConn) SetReadDeadline(t time.Time) error

func (*MockConn) SetResponse

func (m *MockConn) SetResponse(r [][]byte)

func (MockConn) SetWriteDeadline

func (m MockConn) SetWriteDeadline(t time.Time) error

func (*MockConn) Write

func (m *MockConn) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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