ymodem

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SOH  byte = 0x01
	STX  byte = 0x02
	EOT  byte = 0x04
	ACK  byte = 0x06
	NAK  byte = 0x15
	POLL byte = 0x43

	ShortPacketPayloadLen = 128
)

ymodem constants

Variables

View Source
var (
	LongPacketPayloadLen = getLongPacketPayloadLen()

	// default errors
	ErrInvalidPacket   = errors.New("invalid packet")
	ErrSendingEndBlock = errors.New("failed to send end block")
)

Functions

func CRC16

func CRC16(data []byte) uint16

CRC16 calculate crc16

func CRC16Constant

func CRC16Constant(data []byte, length int) uint16

CRC16Constant calculate constant crc16

func ModemReceive

func ModemReceive(c io.ReadWriter) (string, []byte, error)

ModemReceive nodoc

func ModemSend

func ModemSend(c io.ReadWriter, data []byte, filename string) error

ModemSend sends given file data to the stream.

Types

This section is empty.

Jump to

Keyboard shortcuts

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