Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MinFragment is minimum fragment size in bytes. MinFragment = core.FrameHeaderLen + 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 HandleSplitResult ¶ added in v0.6.0
type HandleSplitResult = func(index int, result SplitResult)
HandleSplitResult is callback for fragmentation result.
type HeaderAndPayload ¶
type HeaderAndPayload interface { payload.Payload // FrameHeader returns a header of frame. Header() core.FrameHeader }
HeaderAndPayload is Payload which having a FrameHeader.
type Joiner ¶
type Joiner interface { HeaderAndPayload // First returns the first frame. First() core.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.