processor_ipml

package
v0.0.0-...-aed9a31 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessorImpl

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

func NewProcessor

func NewProcessor(serviceName string, codec inet.Codec) *ProcessorImpl

func (*ProcessorImpl) MakeResponse

func (p *ProcessorImpl) MakeResponse(response any, code ...int32) []byte

func (*ProcessorImpl) OnServerMessage

func (p *ProcessorImpl) OnServerMessage(svr rpc.Server, msg *rpcmsg.RPCMessage)

func (*ProcessorImpl) OnSessionMessage

func (p *ProcessorImpl) OnSessionMessage(sess rpc.Session, msg *rpcmsg.RPCMessage)

网关转发的客户端消息 在协程中执行,若要使消息有序列,需要重新实现这个方法,将消息写入队列等方式

func (*ProcessorImpl) RegisterResponseMsg

func (p *ProcessorImpl) RegisterResponseMsg(msgID int32, response any)

func (*ProcessorImpl) RegisterServerMsgHandler

func (p *ProcessorImpl) RegisterServerMsgHandler(msgID string, f func(rpc.Server, *rpcmsg.RPCMessage))

func (*ProcessorImpl) RegisterSessionMsgHandler

func (p *ProcessorImpl) RegisterSessionMsgHandler(msgID int32, param any, f any)

type RouterInfo

type RouterInfo struct {
	MsgId  int32
	Method reflect.Value
	Param  reflect.Type
}

Jump to

Keyboard shortcuts

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