新增对rpc参数数据类型自动识别(同时支持json与protobuf方式序列化与反序列化)

This commit is contained in:
boyce
2020-10-08 14:12:57 +08:00
parent a4d2a0c4ac
commit 6edc5a0762
8 changed files with 102 additions and 37 deletions

View File

@@ -81,6 +81,12 @@ func (slf *JsonProcessor) ReleaseRpcRespose(rpcRequestData IRpcResponseData){
rpcJsonResponeDataPool.Put(rpcRequestData)
}
func (slf *JsonProcessor) IsParse(param interface{}) bool {
_,err := json.Marshal(param)
return err==nil
}
func (slf *JsonRpcRequestData) IsNoReply() bool{
return slf.NoReply
}