MCPcopy Create free account
hub / github.com/bytemode/pitaya-notes / processHandlerMessage

Function processHandlerMessage

service/util.go:140–222  ·  view source on GitHub ↗

根据Route查找component.Handler利用反射机制调用handler,同时将消息和ctx作为参数

(
	ctx context.Context,
	rt *route.Route, //路由信息
	serializer serialize.Serializer,
	session *session.Session,
	data []byte, //消息体解压后的原始二进制
	msgTypeIface interface{}, //message.Type
	remote bool, //是否远程服务器
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls 15

CtxWithDefaultLoggerFunction · 0.92
PcallFunction · 0.92
getHandlerFunction · 0.85
getMsgTypeFunction · 0.85
unmarshalHandlerArgFunction · 0.85
executeBeforePipelineFunction · 0.85
executeAfterPipelineFunction · 0.85
serializeReturnFunction · 0.85
UIDMethod · 0.80
ValueMethod · 0.80
ValidateMessageTypeMethod · 0.80
WarnfMethod · 0.80