connect

package
v0.0.0-...-617be64 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Per is the duration bucket for the client specific rate limiters that guard
	// the game engine fanout procedure from external overloading.
	Per = vector.Frm * time.Millisecond
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Agl
	Agl *random.Random
	// Cap
	Cap int
	// Crd
	Crd *random.Random
	// Don is the global channel to signal program termination. If this channel is
	// closed, then all streaming connections should be terminated gracefully.
	Don <-chan struct{}
	// Log is the logger interface for printing structured log messages.
	Log logger.Interface
	// Qdr
	Qdr *random.Random
	// Reg is the onchain interface for the Registry smart contract.
	Reg *registry.Registry
	// Rtr
	Rtr *router.Client
	// Tkx
	Tkx *tokenx.TokenX[common.Address]
	// Uni provides a thread safe mechanism to allocate compact player IDs.
	// Allocation happens in the server handler, freeing allocated player IDs
	// happens in the game engine.
	Uni *unique.Unique[common.Address, byte]
}

type Handler

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

func New

func New(c Config) *Handler

func (*Handler) HandlerFunc

func (h *Handler) HandlerFunc(w http.ResponseWriter, r *http.Request) error

Jump to

Keyboard shortcuts

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