摘要: 最近用到了protobuf传输数据,但在protobuf之前还有个协议头。因为是重构,所以需要模拟协议头部。有如下代码string data;char buffer[256];memcpy(buffer, &header, sizeof(header));data.append(buffer);cl... 阅读全文
posted @ 2015-09-23 18:33 westfly 阅读(247) 评论(0) 推荐(0) 编辑