public byte[] GetBinData() { IoBufferWriter wr = new IoBufferWriter(); wr.Write(saveData); return(wr.ToBytes()); }
public byte[] toByte(Msg msg) { Dictionary <Object, Object> param = msg.ParamMap; IoBufferWriter wr = new IoBufferWriter(); wr.Buffer.WriteInt(msg.Cmd); wr.Write(param); byte[] rs = wr.ToBytes(); return(rs); }
public byte[] encode(Msg msg) { IoBufferWriter wr = new IoBufferWriter(); byte[] data = toByte(msg); int len = data.Length; if (logReport != null) { logReport.OnDebugReport("encode msg len:" + len); } wr.Buffer.WriteInt(len); wr.Buffer.WriteByts(data); return(wr.ToBytes()); }