connect

package
v4.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 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 Conn

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

type Messenger

type Messenger struct {
	Tunnel  Tunnel
	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 Tunnel

type Tunnel interface {
	Conn

	ID() string

	Open() error

	Close() error

	Running() bool

	Closed() bool
}

Tunnel 通道

Jump to

Keyboard shortcuts

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