wrapsynchronizer

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package wrapsynchronizer reads 8 byte trice wraps and syncs internally if byte stream inconsistent

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WrapSync

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

WrapSync has a read method. It reader uses an inner reader.

The inner reader reads a raw byte stream.

func New

func New(input io.Reader) *WrapSync

New generates an wrapSync instance

func (*WrapSync) Read

func (p *WrapSync) Read(b []byte) (int, error)

Read fills buff with an 8 byte wrap and returns 8, nil

In case of invalid data Read discards bytes until a valid wrap arrives.

Jump to

Keyboard shortcuts

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