io

package
v0.0.0-...-1bf782c Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type COMMClient

type COMMClient struct {
	serial.Port
	serial.Mode
	// contains filtered or unexported fields
}

func CreateCommClient

func CreateCommClient(comName string, baudRate, dataBits, stopBits, parity, timeOutMilsecond int, autoReconnect bool) (*COMMClient, error)

func (*COMMClient) AutoReconnect

func (_this *COMMClient) AutoReconnect(async bool)

func (*COMMClient) Connect

func (_this *COMMClient) Connect() error

func (*COMMClient) IsConnecting

func (_this *COMMClient) IsConnecting() bool

func (*COMMClient) Read

func (_this *COMMClient) Read() ([]byte, error)

func (*COMMClient) Write

func (_this *COMMClient) Write(buffer []byte) error

type IConnectionClient

type IConnectionClient interface {
	IsConnecting() bool
	AutoReconnect(async bool)
	Connect() error
	Read() ([]byte, error)
	Write(buffer []byte) error
}

type TCPClient

type TCPClient struct {
	net.Conn
	// contains filtered or unexported fields
}

func CreateTCPClient

func CreateTCPClient(ip string, port, timeOutMilsecond int, autoReconnect bool) (*TCPClient, error)

func (*TCPClient) AutoReconnect

func (_this *TCPClient) AutoReconnect(async bool)

func (*TCPClient) Connect

func (_this *TCPClient) Connect() error

func (*TCPClient) IsConnecting

func (_this *TCPClient) IsConnecting() bool

func (*TCPClient) Read

func (_this *TCPClient) Read() ([]byte, error)

func (*TCPClient) Write

func (_this *TCPClient) Write(buffer []byte) error

Jump to

Keyboard shortcuts

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