def

package
v0.0.0-...-47e4f97 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NetworkManager = &network.Network{}
View Source
var NetworkProtocol = protocol.NewLoginProtocol()
View Source
var PacketHandler = &network.PacketHandler{}
View Source
var RPCHandler = &rpc.Client{}
View Source
var ServerConfig = &Config{}
View Source
var ServerSettings = &Settings{}

Functions

This section is empty.

Types

type Config

type Config struct {
	Port int

	CashWeb_URL        string
	CashWeb_Odc_URL    string
	CashWeb_Charge_URL string
	GuildWeb_URL       string
	Sns_URL            string

	MasterIp   string
	MasterPort int

	ScriptDirectory string
}

func (*Config) Read

func (c *Config) Read()

Attempts to read server configuration file

type LoginPacker

type LoginPacker struct{}

LoginPacker treats packet as:

opcode(2)|dataSize(2)|data(n)

| segment | type | size | remark | | ----------- | ------ | ------- | --------------------- | | `opcode` | uint16 | 2 | opcode | | `dataSize` | uint16 | 2 | length of data | | `data` | []byte | dynamic | |

func (*LoginPacker) Pack

func (p *LoginPacker) Pack(msg *easytcp.Message) ([]byte, error)

func (*LoginPacker) Unpack

func (p *LoginPacker) Unpack(reader io.Reader) (*easytcp.Message, error)

type Settings

type Settings struct {
	server.Settings
}

Jump to

Keyboard shortcuts

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