- Python版本: 3.6.1
- Protocol Buffer版本: 3.5.2post1
- MsgPack版本: 0.5.6
Protocol Buffer与MsgPack均为C扩展版
proto文件:
syntax = "proto3";
message TestPacket {
int32 a = 1;
int64 b = 2;
float c = 3;
string d = 4;
uint64 e = 5;
string f = 6;
int32 g = 7;
}
python文件:
import msgpack
import uuid
import time
from protobuf.client import test_pb2 as t