Documentation
¶
Overview ¶
Package boxstream implements npm:pull-box-stream in Go (without the pull)
Index ¶
Constants ¶
View Source
const ( // HeaderLength defines the length of the header packet before the body HeaderLength = 2 + 16 + 16 // MaxSegmentSize is the maximum body size for boxstream packets MaxSegmentSize = 4 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Boxer ¶
type Boxer struct {
// contains filtered or unexported fields
}
Boxer encrypts everything that is written to it
func (*Boxer) WriteGoodbye ¶ added in v1.2.1
WriteGoodbye writes the 'goodbye' protocol message to the underlying writer.
func (*Boxer) WriteMessage ¶ added in v1.2.1
WriteMessage writes a boxstream packet to the underlying writer. len(msg) must not exceed MaxSegmentSize.
type Unboxer ¶
type Unboxer struct {
// contains filtered or unexported fields
}
Unboxer decrypts everything that is read from it
func NewUnboxer ¶
NewUnboxer wraps the passed Reader into an Unboxer.
func (*Unboxer) ReadMessage ¶ added in v1.2.1
ReadMessage reads the next message from the underlying stream. If the next message was a 'goodbye', it returns io.EOF.
Click to show internal directories.
Click to hide internal directories.