protocol

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route added in v1.2.0

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

func ParseRoutes added in v1.2.0

func ParseRoutes(handler interface{}) []*Route

func (*Route) Call added in v1.2.0

func (h *Route) Call(gmt *agent.Meta, req, rsp interface{}) error

func (*Route) Cmd added in v1.2.0

func (h *Route) Cmd() uint32

func (*Route) Name added in v1.2.0

func (h *Route) Name() string

func (*Route) NewReqValue added in v1.2.0

func (h *Route) NewReqValue() reflect.Value

func (*Route) NewRspValue added in v1.2.0

func (h *Route) NewRspValue() reflect.Value

type Router

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

游戏协议路由

func NewRouter

func NewRouter() *Router

func (*Router) AddRoute added in v1.2.0

func (r *Router) AddRoute(handles ...interface{})

注册

func (*Router) Call

func (r *Router) Call(gmt *agent.Meta, cmd uint32, req []byte) (rsp []byte, err error)

调用

func (*Router) Routes

func (r *Router) Routes() map[uint32]*Route

注册

Jump to

Keyboard shortcuts

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