web

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type B

type B = []byte

type Ctx

type Ctx = context.T

type E

type E = error

type N

type N = int

type S

type S = string

type Socket

type Socket struct {
	// contains filtered or unexported fields
}

func NewSocket

func NewSocket(
	conn *websocket.Conn,
	req *http.Request,
	challenge B,
) (ws *Socket)

func (*Socket) AuthRequested added in v1.0.7

func (ws *Socket) AuthRequested() bool

func (*Socket) Authed

func (ws *Socket) Authed() S

func (*Socket) AuthedBytes added in v1.0.13

func (ws *Socket) AuthedBytes() B

func (*Socket) Challenge

func (ws *Socket) Challenge() S

func (*Socket) IsAuthed added in v1.0.14

func (ws *Socket) IsAuthed() bool

func (*Socket) Limiter

func (ws *Socket) Limiter() *rate.Limiter

func (*Socket) RealRemote

func (ws *Socket) RealRemote() S

func (*Socket) Req

func (ws *Socket) Req() *http.Request

func (*Socket) RequestAuth added in v1.0.7

func (ws *Socket) RequestAuth()

func (*Socket) SetAuthed

func (ws *Socket) SetAuthed(s S)

func (*Socket) SetLimiter

func (ws *Socket) SetLimiter(l *rate.Limiter)

func (*Socket) Write

func (ws *Socket) Write(p []byte) (n int, err error)

func (*Socket) WriteJSON

func (ws *Socket) WriteJSON(any interface{}) E

func (*Socket) WriteMessage

func (ws *Socket) WriteMessage(t int, b B) E

Jump to

Keyboard shortcuts

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