io

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadTlvStream

func ReadTlvStream(
	reader io.Reader,
	onFrame func([]byte) bool,
	ignoreError func(error) bool,
) error

Types

type TimedWriter

type TimedWriter struct {
	*bufio.Writer
	// contains filtered or unexported fields
}

TimedWriter is a buffered writer that flushes automatically when a deadline is set and the deadline is exceeded.

func NewTimedWriter

func NewTimedWriter(io io.Writer, bufsize int) *TimedWriter

func (*TimedWriter) Flush

func (w *TimedWriter) Flush() error

func (*TimedWriter) SetDeadline

func (w *TimedWriter) SetDeadline(d time.Duration)

func (*TimedWriter) SetMaxQueue

func (w *TimedWriter) SetMaxQueue(s int)

func (*TimedWriter) Write

func (w *TimedWriter) 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