transmitter

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package transmitter

packet layer:

+---------------------------------------------------------------+
|  symbol(2) | blank(1) | length(2) | blank(1) | payload(n) ... |
+---------------------------------------------------------------+
|<-                 header(6)                ->|--  data(n)   ->|
+---------------------------------------------------------------+
|<-                       packet(6+n)                         ->|
+---------------------------------------------------------------+

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadPacket = errors.New("bad packet")
	ErrBadHeader = errors.New("bad header")
)
View Source
var (
	DefaultSymbol = []byte{255, 254}
	Empty         = make([]byte, 0)
	Blank         = byte(0)
)

Functions

This section is empty.

Types

type ConcurrencyIO added in v0.0.2

type ConcurrencyIO struct {
	// contains filtered or unexported fields
}

func WrapConcurrentConn added in v0.0.2

func WrapConcurrentConn(conn io.ReadWriteCloser) *ConcurrencyIO

func (*ConcurrencyIO) Close added in v0.0.2

func (io *ConcurrencyIO) Close() error

func (*ConcurrencyIO) Read added in v0.0.2

func (io *ConcurrencyIO) Read() (p []byte, n int, err error)

func (*ConcurrencyIO) Write added in v0.0.2

func (io *ConcurrencyIO) Write(p []byte) (n int, err error)

type IO added in v0.0.2

type IO struct {
	// contains filtered or unexported fields
}

func WrapConn added in v0.0.2

func WrapConn(conn io.ReadWriteCloser) *IO

func (*IO) Close added in v0.0.2

func (io *IO) Close() error

func (*IO) Read added in v0.0.2

func (io *IO) Read() (p []byte, n int, err error)

func (*IO) Write added in v0.0.2

func (io *IO) 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