netstrings

package module
v0.0.0-...-f49cd3c Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 5 Imported by: 0

README

netstrings

Go library that wraps a Reader or Writer to Read and Write as netstrings, for example for TCP connections

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(in []byte) ([][]byte, error)

func Encode

func Encode(in ...[]byte) ([]byte, error)

Types

type Reader

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

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) ReadNetstring

func (r *Reader) ReadNetstring() ([]byte, error)

type Writer

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

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) WriteNetstring

func (w *Writer) WriteNetstring(b []byte) error

Jump to

Keyboard shortcuts

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