protocol

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: 0BSD Imports: 10 Imported by: 2

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) OnBinaryMessage added in v1.3.1

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

func (P) OnConnected

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

func (P) OnDisconnect

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

func (P) OnServerClose

func (p P) OnServerClose()

func (P) OnServerUpdate

func (p P) OnServerUpdate()

func (P) OntMessage added in v1.3.3

func (p P) OntMessage(c *zzserver.Client, msgType int, message []byte)

Jump to

Keyboard shortcuts

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