dispatcherclient

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 14 Imported by: 86

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatcherClient

type DispatcherClient struct {
	*proto.GoWorldConnection
	// contains filtered or unexported fields
}

DispatcherClient is a client connection to the dispatcher

func (*DispatcherClient) Close

func (dc *DispatcherClient) Close() error

Close the dispatcher client

type DispatcherClientType

type DispatcherClientType int
const (
	GameDispatcherClientType DispatcherClientType = 1 + iota
	GateDispatcherClientType
)

type DispatcherConnMgr

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

func NewDispatcherConnMgr

func NewDispatcherConnMgr(gid uint16, dctype DispatcherClientType, dispid uint16, isRestoreGame, isBanBootEntity bool, delegate IDispatcherClientDelegate) *DispatcherConnMgr

func (*DispatcherConnMgr) Connect

func (dcm *DispatcherConnMgr) Connect()

Initialize the dispatcher client, only called by engine

func (*DispatcherConnMgr) GetDispatcherClientForSend

func (dcm *DispatcherConnMgr) GetDispatcherClientForSend() *DispatcherClient

GetDispatcherClientForSend returns the current dispatcher client for sending messages

func (*DispatcherConnMgr) String

func (dcm *DispatcherConnMgr) String() string

type IDispatcherClientDelegate

type IDispatcherClientDelegate interface {
	HandleDispatcherClientPacket(msgtype proto.MsgType, packet *netutil.Packet)
	HandleDispatcherClientDisconnect()
	GetEntityIDsForDispatcher(dispid uint16) []common.EntityID
}

IDispatcherClientDelegate defines functions that should be implemented by dispatcher clients

Jump to

Keyboard shortcuts

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