From 649b9bee64d6d612cdd75bc5b5d091e446398379 Mon Sep 17 00:00:00 2001 From: duanhf2012 Date: Thu, 2 Apr 2020 16:07:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- network/processor/pbprocessor.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/network/processor/pbprocessor.go b/network/processor/pbprocessor.go index 1660ee4..86619d8 100644 --- a/network/processor/pbprocessor.go +++ b/network/processor/pbprocessor.go @@ -34,6 +34,14 @@ type PBPackInfo struct { msg proto.Message } +func (slf *PBPackInfo) GetPackType() uint16 { + return slf.typ +} + +func (slf *PBPackInfo) GetMsg() proto.Message { + return slf.msg +} + // must goroutine safe func (slf *PBProcessor ) Route(msg interface{},userdata interface{}) error{ pPackInfo := msg.(*PBPackInfo)