Documentation
¶
Index ¶
Constants ¶
View Source
const FrameLengthFieldSize = 3
Variables ¶
This section is empty.
Functions ¶
func ReadFrameLength ¶
ReadFrameLength reads frame length from bytes and returns the clean buf.
Types ¶
type Frame ¶
type Frame interface { // Bytes converts the frame to bytes Bytes() []byte }
Frame represents a YoMo frame.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Frame Length | +-----------------------------------------------+ | Frame | | | +-----------------------------------------------+
type PayloadFrame ¶
type PayloadFrame struct {
// contains filtered or unexported fields
}
PayloadFrame represents a payload frame.
func NewPayloadFrame ¶
func NewPayloadFrame(data []byte) *PayloadFrame
NewPayloadFrame inits a new PayloadFrame.
func (*PayloadFrame) Bytes ¶
func (p *PayloadFrame) Bytes() []byte
Bytes get the bytes of PayloadFrame.
Click to show internal directories.
Click to hide internal directories.