protocol

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonUnWarp

func JsonUnWarp(message []byte) (t string, data []byte, err error)

func JsonWarp

func JsonWarp(t string, obj proto.Message) (data []byte, err error)

func ProtobufUnWarp

func ProtobufUnWarp(b []byte) (t string, data []byte, err error)

func ProtobufWarp

func ProtobufWarp(t string, obj proto.Message) (data []byte, err error)

func RegHandler

func RegHandler(t string, f func(*zzserver.Client, []byte))

Types

type P

type P struct {
}

func (P) OnConnected

func (p P) OnConnected(c *zzserver.Client)

func (P) OnDisconnect

func (p P) OnDisconnect(c *zzserver.Client)

func (P) OnMessage

func (p P) OnMessage(c *zzserver.Client, message []byte)

func (P) OnServerClose

func (p P) OnServerClose()

func (P) OnServerUpdate

func (p P) OnServerUpdate()

Jump to

Keyboard shortcuts

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