ws

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(mhc MessageHandlerCreator)

Types

type MessageHandler

type MessageHandler interface {
	Handle(ctx context.Context, reqObj js.Value)
}

type MessageHandlerCreator added in v0.3.1

type MessageHandlerCreator func(ctx context.Context) MessageHandler

type Sender added in v0.3.1

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

func (*Sender) Broadcast added in v0.3.1

func (receiver *Sender) Broadcast(gameMessage string)

func (*Sender) Send added in v0.3.1

func (receiver *Sender) Send(playerID int64, gameMessage string)

Jump to

Keyboard shortcuts

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