ws

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultHtmlFile = `` /* 1860-byte string literal not displayed */
View Source
const HotReloadScript = `` /* 558-byte string literal not displayed */

Variables

This section is empty.

Functions

func AddHotReloadScript

func AddHotReloadScript(path string, port string) (*template.Template, error)

func GetDefaultHtmlFile added in v0.3.0

func GetDefaultHtmlFile(port string) (*template.Template, error)

func NewClient

func NewClient(hub *Hub, w http.ResponseWriter, r *http.Request)

Types

type Client

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

type Hub

type Hub struct {
	Broadcast chan []byte
	// contains filtered or unexported fields
}

func NewHub

func NewHub() *Hub

func (*Hub) Run

func (h *Hub) Run()

func (*Hub) SendError added in v0.2.2

func (h *Hub) SendError(mes string)

func (*Hub) SendErrorBytes added in v0.2.2

func (h *Hub) SendErrorBytes(mes []byte)

func (*Hub) SendReload added in v0.2.2

func (h *Hub) SendReload()

Jump to

Keyboard shortcuts

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