Documentation ¶
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).
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.
Click to show internal directories.
Click to hide internal directories.