internal

package
v0.0.0-...-34f5af7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Name returns a uniquely identifying string.
	Identifier() string

	// Init is called before a Backend is started as a hook for the Backend to
	// perform any necessary initialization before it can accept clients.
	Init(ctx context.Context) error

	// SetUpClient performs any initialization on the Client needed to be
	// able to begin the session. Namely, it's the server's responsibility
	// to choose the appropriate encryption implementation.
	SetUpClient(c *client.Client)

	// Handshake performs any connection initialization necessary to begin
	// communicating with the client. This likely involves sending a "welcome" packet.
	Handshake(c *client.Client) error

	// Handle is the main entry point for processing client packets. It's responsible
	// for generally handling all packets from a client as well as sending any responses.
	Handle(ctx context.Context, c *client.Client, data []byte) error
}

Backend is an interface for a sub-server that handles a specific set of client interactions as part of the game flow.

type Controller

type Controller struct {
	Config *core.Config
	// contains filtered or unexported fields
}

Controller is the main entrypoint for archon. It's responsible for initializing any shared resources (such as database and logging), defining the servers, and launching everything.

func (*Controller) Shutdown

func (c *Controller) Shutdown(ctx context.Context)

func (*Controller) Start

func (c *Controller) Start(ctx context.Context)

Directories

Path Synopsis
Constants and structs associated with character data.
Constants and structs associated with character data.
encryption
Most of this code is copied from the golang.org/x/crypto/blowfish package.
Most of this code is copied from the golang.org/x/crypto/blowfish package.
prs
https://github.com/Sewer56/dlang-prs
https://github.com/Sewer56/dlang-prs
Packets used by multiple server types.
Packets used by multiple server types.

Jump to

Keyboard shortcuts

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