entranceserver

package
v0.0.0-...-b1f961f Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcSum32

func CalcSum32(data []byte) uint32

CalcSum32 calculates the custom MHF "sum32" checksum of the given data.

func DecryptBin8

func DecryptBin8(data []byte, key byte) []byte

DecryptBin8 decrypts the given MHF "binary8" data.

func EncryptBin8

func EncryptBin8(data []byte, key byte) []byte

EncryptBin8 encrypts the given data using MHF's "binary8" encryption.

Types

type Config

type Config struct {
	Logger      *zap.Logger
	DB          *sqlx.DB
	ErupeConfig *config.Config
}

Config struct allows configuring the server.

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Server is a MHF entrance server.

func NewServer

func NewServer(config *Config) *Server

NewServer creates a new Server type.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown exits the server gracefully.

func (*Server) Start

func (s *Server) Start() error

Start starts the server in a new goroutine.

Jump to

Keyboard shortcuts

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