ship

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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// BackMenuItem is the block ID reserved for returning to the ship select menu.
	BackMenuItem = 0xFF
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Name    string
	Address string
	ID      int
}

type Server

type Server struct {
	Name   string
	Config *core.Config
	Logger *logrus.Logger
	Blocks []Block
	// contains filtered or unexported fields
}

Server is the SHIP server implementation. This is similar to PATCH and LOGIN in that it really just exists to be a gateway. Is main responsibility is to provide the client with the block list and then send the address of the block that the user selects.

func (*Server) Handle

func (s *Server) Handle(ctx context.Context, c *client.Client, data []byte) error

func (*Server) Handshake

func (s *Server) Handshake(c *client.Client) error

func (*Server) Identifier

func (s *Server) Identifier() string

func (*Server) Init

func (s *Server) Init(ctx context.Context) error

Init connects the ship to the shipgate and registers so that it can begin receiving players.

func (*Server) SetUpClient

func (s *Server) SetUpClient(c *client.Client)

Jump to

Keyboard shortcuts

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