Documentation
¶
Index ¶
- Variables
- func FixError(ctx context.Context, err error) error
- func Stopper(ctx context.Context, dead func(time.Time) error) func()
- type Client
- type Conn
- func (c *Conn) Close() (err error)
- func (c *Conn) CloseWriter(status Status) (err error)
- func (c *Conn) CloseWriterBody(status Status, body []byte) (err error)
- func (c *Conn) NextFrame(ctx context.Context) (Frame, error)
- func (c *Conn) NextRawFrame(ctx context.Context) (Frame, error)
- func (c *Conn) Read(p []byte) (n int, err error)
- func (c *Conn) ReadContext(ctx context.Context, p []byte) (n int, err error)
- func (c *Conn) Write(p []byte) (int, error)
- func (c *Conn) WriteFrame(p []byte, op Opcode, final bool) (int, error)
- type DialerContext
- type Frame
- func (f Frame) More() int
- func (f Frame) Read(p []byte) (n int, err error)
- func (f Frame) ReadAppendTo(ctx context.Context, b []byte) ([]byte, error)
- func (f Frame) ReadAppendToLimit(ctx context.Context, b []byte, limit int) ([]byte, error)
- func (f Frame) ReadContext(ctx context.Context, p []byte) (n int, err error)
- type Handler
- type HeaderBits
- func (f HeaderBits) Fin() bool
- func (f HeaderBits) IsDataFrame() bool
- func (f HeaderBits) Masked() bool
- func (f HeaderBits) Opcode() Opcode
- func (f *HeaderBits) Parse(b []byte, st int) int
- func (f HeaderBits) ParseLen(b []byte, st int) (l, i int)
- func (f HeaderBits) ReadMaskingKey(b []byte, st int, key []byte) (i int)
- type Opcode
- type Server
- type Status
- type StatusText
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClosed = errors.New("attempt to write to closed connection") ErrNotHijacker = errors.New("response is not hijacker") ErrNotWebsocket = errors.New("not websocket") ErrProtocol = StatusProtocol ErrTrailingData = errors.New("trailing data in request") )
Functions ¶
Types ¶
type DialerContext ¶
type HeaderBits ¶
type HeaderBits [2]byte
func MakeHeaderBits ¶
func MakeHeaderBits(op int, final, masked bool) HeaderBits
func (HeaderBits) Fin ¶
func (f HeaderBits) Fin() bool
func (HeaderBits) IsDataFrame ¶
func (f HeaderBits) IsDataFrame() bool
func (HeaderBits) Masked ¶
func (f HeaderBits) Masked() bool
func (HeaderBits) Opcode ¶
func (f HeaderBits) Opcode() Opcode
func (HeaderBits) ReadMaskingKey ¶
func (f HeaderBits) ReadMaskingKey(b []byte, st int, key []byte) (i int)
type Server ¶
type Server struct {
Handler Handler
}
func (*Server) ServeHandler ¶
type StatusText ¶
func (*StatusText) Error ¶
func (s *StatusText) Error() string
func (*StatusText) Unwrap ¶
func (s *StatusText) Unwrap() error
Click to show internal directories.
Click to hide internal directories.