zerows

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 6 Imported by: 0

README

zerows

Zero alloc Go Websocket client (using gobwas)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHeaderLengthMSB        = fmt.Errorf("header error: the most significant bit must be 0")
	ErrHeaderLengthUnexpected = fmt.Errorf("header error: unexpected payloadBuffer length bits")
)

Errors used by frame reader.

Functions

func HandlePayload

func HandlePayload(conn *net.Conn, length int) ([]byte, error)

func HandlePing

func HandlePing(conn *net.Conn) error

HandlePing answers a ping message with a pong message

func ReadHeader

func ReadHeader(r io.Reader) (h ws.Header, err error)

ReadHeader reads a frame header from r.

func WriteHeader

func WriteHeader(w io.Writer, h ws.Header) error

WriteHeader writes header binary representation into w.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL