From ee97e3ef6b2f59a95675e7cdd7f0c653403eb53e Mon Sep 17 00:00:00 2001 From: azw Date: Wed, 16 Aug 2023 21:56:57 +0800 Subject: [PATCH] 1 --- prototils.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/prototils.go b/prototils.go index 612f38f..7395621 100644 --- a/prototils.go +++ b/prototils.go @@ -22,6 +22,13 @@ type MsgHdr struct { Entry q5.ListHead } +type NetMsgHandler[T any] struct { + MsgId int + HandlerId int + ParseCb func([]byte) interface{} + Cb func(*MsgHdr, T) +} + type NetMsg interface { GetNetMsgId() uint16 }