websocket

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	Close() error
	State() ws.State

	Read() ([]byte, error)
	ReadString() (string, error)
	ReadJSON(v any) error

	Write(p []byte) error
	WriteString(p string) error
	WriteJSON(v any) error
}

func Dial

func Dial(ctx context.Context, urlStr string) (conn Conn, err error)

func UpgradeHTTP

func UpgradeHTTP(w http.ResponseWriter, r *http.Request) (conn Conn, err error)

Jump to

Keyboard shortcuts

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