Documentation
¶
Index ¶
Constants ¶
View Source
const ( MagicWordLen = len(dataFrameMagicWord) DataFrameLen = 8 ForewordLen = MagicWordLen + DataFrameLen )
Variables ¶
This section is empty.
Functions ¶
func NewDataFrame ¶ added in v1.0.0
func NewDataFrame() *dataFrame
Types ¶
type DataFrame ¶
type DataFrame interface {
// Returns true when data frame is fully captured
IsFullFrame() bool
// Decodes captured data frame
Decode(receiver interface{}) error
// Capture data stream into a data frame
Capture(buf []byte) error
// Returns data frame
GetFrame() []byte
// Resets frame capturing returning captured before data
Flush() []byte
// Converts data into a frame using gob encoding
ToFrame(data interface{}) ([]byte, error)
}
Click to show internal directories.
Click to hide internal directories.