ws

package
v0.0.0-...-839ea1c Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package ws is based on gorilla websockets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Notifier
	// contains filtered or unexported fields
}

Handler builder

func New

func New(n Notifier, secretKey string) (Handler, error)

New returns a Notifier and runs the party Router

func (*Handler) Handler

func (h *Handler) Handler() func(http.ResponseWriter, *http.Request)

Handler creates the http handler that upgrades conn to ws

type Notifier

type Notifier interface {
	Notify(user.Token, func(reply <-chan event.Reply))
}

Notifier notifies the arrival of a new WS client

Directories

Path Synopsis
Package client specific behavior for WS
Package client specific behavior for WS

Jump to

Keyboard shortcuts

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