TarsPHP / TarsPHP

基础目录,聚合所有其他目录,包含文档和例子
511 stars 127 forks source link

Tars协议中请求参数基于json序列化,整个包基于tars协议序列化 #40

Closed ThunderRussell closed 4 years ago

ThunderRussell commented 4 years ago

tarsgo中扩展了tars协议,当JSONVERSION version = 257时,tars协议包中的SBuffer以json序列化方式写入; req := requestf.RequestPacket{ IVersion: s.version, CPacketType: int8(ctype), IRequestId: atomic.AddInt32(&msgID, 1), SServantName: s.name, SFuncName: sFuncName, SBuffer: tools.ByteToInt8(buf), //buf基于json序列化 ITimeout: s.comm.Client.ReqDefaultTimeout, Context: reqContext, Status: status, IMessageType: msgType, } 其他字段已原有tars格式序列化 望tarsphp能尽快支持对应功能

bobzhangyong commented 4 years ago

TarsPHP/tars-server@e16a260ff51e3301439ce66556c2de086f591aa0

Done