Version: v0.12.17 Latest Latest

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

Go to latest
Published: Jan 31, 2016 License: MIT, MPL-2.0 Imports: 6 Imported by: 0



Build Status Coverage Status API Documentation MIT License

This is an XDR encoding/decoding library. It uses code generation and not reflection. It supports the IPDR bastardized XDR format when built with -tags ipdr.



Package xdr implements an XDR (RFC 4506) encoder/decoder.



This section is empty.


This section is empty.


func ElementSizeExceeded added in v0.10.3

func ElementSizeExceeded(field string, size, limit int) error


type AppendWriter

type AppendWriter []byte

func (*AppendWriter) Write

func (w *AppendWriter) Write(bs []byte) (int, error)

type Reader

type Reader struct {
	// contains filtered or unexported fields

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) Error

func (r *Reader) Error() error

func (*Reader) ReadBool

func (r *Reader) ReadBool() bool

func (*Reader) ReadBytes

func (r *Reader) ReadBytes() []byte

func (*Reader) ReadBytesInto

func (r *Reader) ReadBytesInto(dst []byte) []byte

func (*Reader) ReadBytesMax

func (r *Reader) ReadBytesMax(max int) []byte

func (*Reader) ReadBytesMaxInto

func (r *Reader) ReadBytesMaxInto(max int, dst []byte) []byte

func (*Reader) ReadRaw

func (r *Reader) ReadRaw(bs []byte) (int, error)

func (*Reader) ReadString

func (r *Reader) ReadString() string

func (*Reader) ReadStringMax

func (r *Reader) ReadStringMax(max int) string

func (*Reader) ReadUint16

func (r *Reader) ReadUint16() uint16

func (*Reader) ReadUint32

func (r *Reader) ReadUint32() uint32

func (*Reader) ReadUint64

func (r *Reader) ReadUint64() uint64

func (*Reader) ReadUint8

func (r *Reader) ReadUint8() uint8

type Writer

type Writer struct {
	// contains filtered or unexported fields

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) Error

func (w *Writer) Error() error

func (*Writer) Tot

func (w *Writer) Tot() int

func (*Writer) WriteBool

func (w *Writer) WriteBool(v bool) (int, error)

func (*Writer) WriteBytes

func (w *Writer) WriteBytes(bs []byte) (int, error)

func (*Writer) WriteRaw

func (w *Writer) WriteRaw(bs []byte) (int, error)

func (*Writer) WriteString

func (w *Writer) WriteString(s string) (int, error)

func (*Writer) WriteUint16

func (w *Writer) WriteUint16(v uint16) (int, error)

func (*Writer) WriteUint32

func (w *Writer) WriteUint32(v uint32) (int, error)

func (*Writer) WriteUint64

func (w *Writer) WriteUint64(v uint64) (int, error)

func (*Writer) WriteUint8

func (w *Writer) WriteUint8(v uint8) (int, error)

type XDRError

type XDRError struct {
	// contains filtered or unexported fields

func (XDRError) Error

func (e XDRError) Error() string

func (XDRError) IsEOF added in v0.10.19

func (e XDRError) IsEOF() bool


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL