dispatcherclient

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(delegate IDispatcherClientDelegate, autoFlush bool)

Initialize the dispatcher client, only called by engine

Types

type DispatcherClient

type DispatcherClient struct {
	*proto.GoWorldConnection
}

DispatcherClient is a client connection to the dispatcher

func GetDispatcherClientForSend

func GetDispatcherClientForSend() *DispatcherClient

GetDispatcherClientForSend returns the current dispatcher client for sending messages

func (*DispatcherClient) Close

func (dc *DispatcherClient) Close() error

Close the dispatcher client

type IDispatcherClientDelegate

type IDispatcherClientDelegate interface {
	OnDispatcherClientConnect(dispatcherClient *DispatcherClient, isReconnect bool)
	HandleDispatcherClientPacket(msgtype proto.MsgType, packet *netutil.Packet)
	HandleDispatcherClientDisconnect()
	HandleDispatcherClientBeforeFlush()
}

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