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
Click to show internal directories.
Click to hide internal directories.