Versions in this module Expand all Collapse all v1 v1.8.8 Jul 25, 2022 Changes in this version + func NetConn(ctx context.Context, c *Conn, msgType MessageType) net.Conn + type AcceptOptions struct + CompressionMode CompressionMode + CompressionThreshold int + InsecureSkipVerify bool + OriginPatterns []string + Subprotocols []string + type CloseError struct + Code StatusCode + Reason string + func (ce CloseError) Error() string + type CompressionMode int + const CompressionContextTakeover + const CompressionDisabled + const CompressionNoContextTakeover + type Conn struct + func Accept(w http.ResponseWriter, r *http.Request, opts *AcceptOptions) (*Conn, error) + func Dial(ctx context.Context, u string, opts *DialOptions) (*Conn, *http.Response, error) + func Dial(ctx context.Context, url string, opts *DialOptions) (*Conn, *http.Response, error) + func (c *Conn) Close(code StatusCode, reason string) error + func (c *Conn) CloseRead(ctx context.Context) context.Context + func (c *Conn) Ping(ctx context.Context) error + func (c *Conn) Read(ctx context.Context) (MessageType, []byte, error) + func (c *Conn) Reader(ctx context.Context) (MessageType, io.Reader, error) + func (c *Conn) SetReadLimit(n int64) + func (c *Conn) Subprotocol() string + func (c *Conn) Write(ctx context.Context, typ MessageType, p []byte) error + func (c *Conn) Writer(ctx context.Context, typ MessageType) (io.WriteCloser, error) + type DialOptions struct + CompressionMode CompressionMode + CompressionThreshold int + HTTPClient *http.Client + HTTPHeader http.Header + Subprotocols []string + type MessageType int + const MessageBinary + const MessageText + func (i MessageType) String() string + type StatusCode int + const StatusAbnormalClosure + const StatusBadGateway + const StatusGoingAway + const StatusInternalError + const StatusInvalidFramePayloadData + const StatusMandatoryExtension + const StatusMessageTooBig + const StatusNoStatusRcvd + const StatusNormalClosure + const StatusPolicyViolation + const StatusProtocolError + const StatusServiceRestart + const StatusTLSHandshake + const StatusTryAgainLater + const StatusUnsupportedData + func CloseStatus(err error) StatusCode + func (i StatusCode) String() string