Versions in this module Expand all Collapse all v0 v0.1.1 Jan 2, 2020 v0.1.0 Mar 6, 2019 Changes in this version + const StatusGoAway + const StatusNone + const StatusNotAcceptable + const StatusNotConsistent + const StatusProtocolError + const StatusReserved + const StatusTooBig + const StatusUnexpected + const StatusViolation + const StatuseExtensionsNeeded + var EOF = io.EOF + var ErrCannotUpgrade = errors.New("cannot upgrade connection") + func ReleaseFrame(fr *Frame) + func Upgrade(handler RequestHandler) func(ctx *fasthttp.RequestCtx) + type Code uint8 + const CodeBinary + const CodeClose + const CodeContinuation + const CodePing + const CodePong + const CodeText + type Conn struct + MaxPayloadSize uint64 + Mode Mode + func Client(c net.Conn, url string) (*Conn, error) + func ClientWithHeaders(c net.Conn, url string, req *fasthttp.Request) (*Conn, error) + func Dial(url string) (*Conn, error) + func DialWithHeaders(url string, req *fasthttp.Request) (*Conn, error) + func (conn *Conn) Close() error + func (conn *Conn) CloseString(b string) error + func (conn *Conn) LocalAddr() net.Addr + func (conn *Conn) NextFrame() (fr *Frame, err error) + func (conn *Conn) ReadFrame(fr *Frame) (nn int, err error) + func (conn *Conn) ReadMessage(b []byte) (Mode, []byte, error) + func (conn *Conn) RemoteAddr() net.Addr + func (conn *Conn) ReplyClose(fr *Frame) (err error) + func (conn *Conn) Reset(c net.Conn) + func (conn *Conn) SendCode(code Code, status StatusCode, b []byte) error + func (conn *Conn) SendCodeString(code Code, status StatusCode, b string) error + func (conn *Conn) SetDeadline(t time.Time) error + func (conn *Conn) SetReadDeadline(t time.Time) error + func (conn *Conn) SetWriteDeadline(t time.Time) error + func (conn *Conn) Write(b []byte) (int, error) + func (conn *Conn) WriteFrame(fr *Frame) (int, error) + func (conn *Conn) WriteMessage(mode Mode, b []byte) (int, error) + func (conn *Conn) WriteString(b string) (int, error) + type Frame struct + func AcquireFrame() *Frame + func (fr *Frame) Code() Code + func (fr *Frame) HasRSV1() bool + func (fr *Frame) HasRSV2() bool + func (fr *Frame) HasRSV3() bool + func (fr *Frame) IsClose() bool + func (fr *Frame) IsContinuation() bool + func (fr *Frame) IsFin() bool + func (fr *Frame) IsMasked() bool + func (fr *Frame) IsPing() bool + func (fr *Frame) IsPong() bool + func (fr *Frame) Len() (length uint64) + func (fr *Frame) Mask() + func (fr *Frame) MaskKey() []byte + func (fr *Frame) Mode() (mode Mode) + func (fr *Frame) Payload() []byte + func (fr *Frame) PayloadSize() uint64 + func (fr *Frame) ReadFrom(rd io.Reader) (nn uint64, err error) + func (fr *Frame) Reset() + func (fr *Frame) SetBinary() + func (fr *Frame) SetClose() + func (fr *Frame) SetCode(code Code) + func (fr *Frame) SetContinuation() + func (fr *Frame) SetFin() + func (fr *Frame) SetMask(b []byte) + func (fr *Frame) SetPayload(b []byte) + func (fr *Frame) SetPayloadSize(size uint64) + func (fr *Frame) SetPing() + func (fr *Frame) SetPong() + func (fr *Frame) SetRSV1() + func (fr *Frame) SetRSV2() + func (fr *Frame) SetRSV3() + func (fr *Frame) SetStatus(status StatusCode) + func (fr *Frame) SetText() + func (fr *Frame) Status() (status StatusCode) + func (fr *Frame) Unmask() + func (fr *Frame) UnsetMask() + func (fr *Frame) Write(b []byte) (int, error) + func (fr *Frame) WriteTo(wr io.Writer) (n uint64, err error) + type Mode uint8 + const ModeBinary + const ModeNone + const ModeText + type RequestHandler func(conn *Conn) + type StatusCode uint16 + type UpgradeHandler func(*fasthttp.RequestCtx) bool + type Upgrader struct + Compress bool + Handler RequestHandler + Origin string + Protocols []string + UpgradeHandler UpgradeHandler + func (upgr *Upgrader) Upgrade(ctx *fasthttp.RequestCtx)