ws

package
v0.0.0-...-a23e47f Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WsClient

func WsClient(hub *Hub, w http.ResponseWriter, r *http.Request, startCapture chan bool)

Types

type Client

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

type Hub

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

func NewHub

func NewHub() *Hub

func (*Hub) Run

func (h *Hub) Run()

type Message

type Message struct {
	CMD  string      `json:"cmd"`
	Data interface{} `json:"data"`
}

func NewMessage

func NewMessage() *Message

func (*Message) ParseJson

func (m *Message) ParseJson(data string) (*Message, error)

func (*Message) ParseMessage

func (m *Message) ParseMessage(data string) (*Message, error)

type Point

type Point struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

Jump to

Keyboard shortcuts

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