使用protobuf 遇到坑
来源:互联网 发布:99家居软件怎么样 编辑:程序博客网 时间:2024/06/03 10:08
我用的Protobuf是服务器是js客户端是Lua
1.如果message协议字段,都是optional类型
并且发送时候每个字段的值都是默认值,比如int32类型的是0,bool类型的是false,那么这条消息则发不出去,把一个字段改成required就可以了
2.Protobuf不支持数组嵌套,(比如自定义的类型中含有repeated,然后外层数组的元素是这个类型)
3.
optional bool a = 33;
repeated string b = 34;
当 a的数据为0,b的数据客户端解析出来的数据服务器传过来的结果不一致, 为空数组
4.枚举类型的字段用 optional 客户端解析出来结果和服务器传过来的结果不一致,是nil
阅读全文
0 0
- 使用protobuf 遇到坑
- iOS开发中使用protobuf遇到的一些问题
- protobuf使用
- protobuf 使用
- protobuf使用
- protobuf使用
- 使用protoBuf
- 【protobuf】protobuf ubuntu python3使用
- 【Google Protobuf】protobuf的使用(二)
- protobuf使用初步
- Google Protobuf 使用介绍
- 使用protobuf定义消息
- protobuf安装与使用
- protobuf使用介绍
- Google Protobuf的使用
- protobuf的使用初探
- 初次使用protobuf
- Google Protobuf 使用介绍
- KthLargestElementArray
- HTTP协议
- Spring错误整理
- Java常见Lock(四): lock之Semaphore、CountDownLatch、StampedLock
- webstorm添加*.vue文件代码提醒支持webstorm支持es6vue里支持es6写法
- 使用protobuf 遇到坑
- JSP 基础之 JSTL <c:forEach>用法
- 字符串常量之间有趣的事情
- JSON取值(key是中文或者数字)方式详解
- 使用FireBird数据库
- 插入排序 -JAVA详解
- filter
- ubuntu pip版本下载路径问题
- 使用Jxcell和POI给Excel文件添加打开密码