web

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Socket

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

func NewSocket

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

func (*Socket) AuthRequested

func (ws *Socket) AuthRequested() bool

func (*Socket) Authed

func (ws *Socket) Authed() string

func (*Socket) AuthedBytes

func (ws *Socket) AuthedBytes() []byte

func (*Socket) Challenge

func (ws *Socket) Challenge() string

func (*Socket) IsAuthed

func (ws *Socket) IsAuthed() bool

func (*Socket) Limiter

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

func (*Socket) RealRemote

func (ws *Socket) RealRemote() string

func (*Socket) Req

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

func (*Socket) RequestAuth

func (ws *Socket) RequestAuth()

func (*Socket) SetAuthed

func (ws *Socket) SetAuthed(s string)

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{}) error

func (*Socket) WriteMessage

func (ws *Socket) WriteMessage(t int, b []byte) error

Jump to

Keyboard shortcuts

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