sockets

package
v0.0.0-...-edf0be2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DonationEvent

type DonationEvent struct {
	Name       string `json:"name"`
	Text       string `json:"text"`
	Amount     int    `json:"amount"`
	StreamerID int    `json:"-"`
}

type Hub

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

func CreateNew

func CreateNew() Hub

func (*Hub) Donate

func (hub *Hub) Donate(donation DonationEvent)

func (*Hub) RegisterClient

func (hub *Hub) RegisterClient(conn *websocket.Conn, streamerID int)

func (*Hub) Run

func (hub *Hub) Run()

type RegistrationRequest

type RegistrationRequest struct {
	Conn       *websocket.Conn
	StreamerID int
}

Jump to

Keyboard shortcuts

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