transmitter

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 7 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 net.Conn) *ConcurrencyIO

func (*ConcurrencyIO) Close added in v0.0.2

func (io *ConcurrencyIO) Close() error

func (*ConcurrencyIO) LocalAddr added in v0.0.6

func (io *ConcurrencyIO) LocalAddr() net.Addr

func (*ConcurrencyIO) Read added in v0.0.2

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

func (*ConcurrencyIO) ReadOnePacket added in v0.0.6

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

func (*ConcurrencyIO) RemoteAddr added in v0.0.6

func (io *ConcurrencyIO) RemoteAddr() net.Addr

func (*ConcurrencyIO) SetDeadline added in v0.0.6

func (io *ConcurrencyIO) SetDeadline(t time.Time) error

func (*ConcurrencyIO) SetReadDeadline added in v0.0.6

func (io *ConcurrencyIO) SetReadDeadline(t time.Time) error

func (*ConcurrencyIO) SetWriteDeadline added in v0.0.6

func (io *ConcurrencyIO) SetWriteDeadline(t time.Time) 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 net.Conn) *IO

func (*IO) Close added in v0.0.2

func (io *IO) Close() error

func (*IO) LocalAddr added in v0.0.6

func (io *IO) LocalAddr() net.Addr

func (*IO) Read added in v0.0.2

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

func (*IO) ReadOnePacket added in v0.0.6

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

func (*IO) RemoteAddr added in v0.0.6

func (io *IO) RemoteAddr() net.Addr

func (*IO) SetDeadline added in v0.0.6

func (io *IO) SetDeadline(t time.Time) error

func (*IO) SetReadDeadline added in v0.0.6

func (io *IO) SetReadDeadline(t time.Time) error

func (*IO) SetWriteDeadline added in v0.0.6

func (io *IO) SetWriteDeadline(t time.Time) 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