Documentation ¶
Index ¶
- Constants
- Variables
- type Buffer
- func (bb *Buffer) Append(b []byte)
- func (bb *Buffer) Head(n int) ([]byte, error)
- func (bb *Buffer) Len() int
- func (bb *Buffer) OnRelease(onRelease func(b []byte))
- func (bb *Buffer) Pop(n int) ([]byte, error)
- func (bb *Buffer) Push(b []byte)
- func (bb *Buffer) Read(n int) ([]byte, error)
- func (bb *Buffer) ReadAll() ([]byte, error)
- func (bb *Buffer) Reset()
- func (bb *Buffer) Sub(from, to int) ([]byte, error)
- func (bb *Buffer) Write(b []byte)
- type HTTPBuffer
- func (hb *HTTPBuffer) Push(b []byte)
- func (hb *HTTPBuffer) ReadHeader() (headKey string, headValue string, ok bool, err error)
- func (hb *HTTPBuffer) ReadRequestLine() (method string, requestURI string, proto string, err error)
- func (hb *HTTPBuffer) ReadResponseLine() (method string, requestURI string, proto string, status string, err error)
Constants ¶
View Source
const ( // CR . CR = '\r' // LF . LF = '\n' // COL . COL = ':' // SPA . SPA = ' ' )
Variables ¶
View Source
var ( ErrInvalidLength = errors.New("invalid length") ErrInvalidPosition = errors.New("invalid position") ErrNotEnougth = errors.New("bytes not enougth") )
View Source
var ( // ErrDataNotEnouth . ErrDataNotEnouth = errors.New("data not enougth") // ErrInvalidData . ErrInvalidData = errors.New("invalid data") )
Functions ¶
This section is empty.
Types ¶
type HTTPBuffer ¶
type HTTPBuffer struct { Buffer // contains filtered or unexported fields }
HTTPBuffer .
func (*HTTPBuffer) ReadHeader ¶
func (hb *HTTPBuffer) ReadHeader() (headKey string, headValue string, ok bool, err error)
ReadHeader .
func (*HTTPBuffer) ReadRequestLine ¶
func (hb *HTTPBuffer) ReadRequestLine() (method string, requestURI string, proto string, err error)
ReadRequestLine .
func (*HTTPBuffer) ReadResponseLine ¶
func (hb *HTTPBuffer) ReadResponseLine() (method string, requestURI string, proto string, status string, err error)
ReadResponseLine .
Click to show internal directories.
Click to hide internal directories.