readwriter

package
v0.0.0-...-9a529fd Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2017 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Write(data interface{})
	TryRead(to func(data []byte) error)
	Read(to func(data []byte))
	Bytes() ([]byte, error)
	Err() error
}

func New

func New(buf []byte) Interface

newEntryReadWriter create a new read/writer from an existing buffer.

If a nil or empty buffer is supplied, reading from the read/writer will cause an error (io.EOF) Nevertheless, if a valid non-empty buffer is given, the read/writer will start reading from the beginning of that buffer, and will start writting at the end of it.

Jump to

Keyboard shortcuts

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