comm

package
v0.0.0-...-eaa9bf8 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUpgrader

func NewUpgrader() *websocket.Upgrader

Types

type Echo

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

func NewEchoHandler

func NewEchoHandler(up *websocket.Upgrader) *Echo

func (*Echo) HandleFunc

func (e *Echo) HandleFunc(w http.ResponseWriter, r *http.Request)

type Game

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

func NewGameHandler

func NewGameHandler(up *websocket.Upgrader, db storage.Storage, vehicleSvc services.ServiceHandler, driverSvc services.ServiceHandler, trackSvc services.ServiceHandler, eventSvc services.ServiceHandler) *Game

func (*Game) HandleFunc

func (g *Game) HandleFunc(w http.ResponseWriter, r *http.Request)

func (*Game) HandleMessage

func (g *Game) HandleMessage(ctx context.Context, message []byte) (msg []byte, err error)

type WebSocketHandler

type WebSocketHandler interface {
	HandleFunc(w http.ResponseWriter, r *http.Request)
	Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*websocket.Conn, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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