Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MinFragment is minimum fragment size in bytes. MinFragment = framing.HeaderLen + 4 // MaxFragment is minimum fragment size in bytes. MaxFragment = common.MaxUint24 - 3 )
Variables ¶
This section is empty.
Functions ¶
func IsValidFragment ¶
IsValidFragment validate fragment size.
Types ¶
type HeaderAndPayload ¶
type HeaderAndPayload interface {
payload.Payload
// Header returns a header of frame.
Header() framing.FrameHeader
}
HeaderAndPayload is Payload which having a FrameHeader.
type Joiner ¶
type Joiner interface {
HeaderAndPayload
// First returns the first frame.
First() framing.Frame
// Push append a new frame and returns true if joiner is end.
Push(elem HeaderAndPayload) (end bool)
}
Joiner is used to join frames to a payload.
Click to show internal directories.
Click to hide internal directories.