Documentation ¶
Overview ¶
Package protoio may be internalized (made private) in future releases. XXX Deprecated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReadCloser ¶
func NewDelimitedReader ¶
func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser
NewDelimitedReader reads varint-delimited Protobuf messages from a reader. Unlike the gogoproto NewDelimitedReader, this does not buffer the reader, which may cause poor performance but is necessary when only reading single messages (e.g. in the p2p package). It also returns the number of bytes read, which is necessary for the p2p package.
type WriteCloser ¶
func NewDelimitedWriter ¶
func NewDelimitedWriter(w io.Writer) WriteCloser
NewDelimitedWriter writes a varint-delimited Protobuf message to a writer. It is equivalent to the gogoproto NewDelimitedWriter, except WriteMsg() also returns the number of bytes written, which is necessary in the p2p package.