Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer combines ring-buffer and list-buffer. Ring-buffer is the top-priority buffer to store response data, gnet will only switch to list-buffer if the data size of ring-buffer reaches the maximum(MaxStackingBytes), list-buffer is more flexible and scalable, which helps the application reduce memory footprint.
func (*Buffer) Peek ¶
Peek returns n bytes as [][]byte, these bytes won't be discarded until Buffer.Discard() is called.
Click to show internal directories.
Click to hide internal directories.