Documentation ¶
Overview ¶
Package gfd provides a structure GFD to store the fd, eventloop index, connStore indexes and some other information.
GFD structure: |eventloop index|conn matrix row index|conn matrix column index|monotone sequence| socket fd | | 1 byte | 1 byte | 2 byte | 4 byte | 8 byte |.
Index ¶
Constants ¶
View Source
const ( ConnMatrixColumnOffset = 2 SequenceOffset = 4 FdOffset = 8 EventLoopIndexMax = math.MaxUint8 + 1 ConnMatrixRowMax = math.MaxUint8 + 1 ConnMatrixColumnMax = math.MaxUint16 + 1 )
Constants for GFD.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GFD ¶
type GFD [0x10]byte
GFD is a structure to store the fd, eventloop index, connStore indexes.
func (GFD) ConnMatrixColumn ¶
ConnMatrixColumn returns the connMatrix column index.
func (GFD) ConnMatrixRow ¶
ConnMatrixRow returns the connMatrix row index.
func (GFD) EventLoopIndex ¶
EventLoopIndex returns the eventloop index.
func (*GFD) UpdateIndexes ¶
UpdateIndexes updates the connStore indexes.
Click to show internal directories.
Click to hide internal directories.