connect

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	io.ReadWriteCloser
	SetReadTimeout(t time.Duration) error
}

type Messenger

type Messenger struct {
	Conn

	Timeout time.Duration
	// contains filtered or unexported fields
}

func (*Messenger) Ask

func (m *Messenger) Ask(request []byte, response []byte) (int, error)

func (*Messenger) AskAtLeast

func (m *Messenger) AskAtLeast(request []byte, response []byte, min int) (int, error)

func (*Messenger) Read

func (m *Messenger) Read(response []byte) (int, error)

func (*Messenger) ReadAtLeast

func (m *Messenger) ReadAtLeast(response []byte, min int) (int, error)

type NetConn added in v0.0.3

type NetConn struct {
	net.Conn
}

func (*NetConn) SetReadTimeout added in v0.0.3

func (c *NetConn) SetReadTimeout(t time.Duration) error

Jump to

Keyboard shortcuts

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