kotlin serialization protobuf with netty
Netty 具备与protobuf相连的功能,使用步骤是
- 定制proto文件
- 使用protoc生成OuterClass文件
- 使用Netty的ProtobufDecoder和ProtobufEncoder进行编解码
Kotlinx Serialization中也具备protobuf的功能,使用步骤是
- 直接定制Message.kt文件
- 自定义MessageDecoder和MessageEncoder进行序列化和反序列化,更为方便
浙公网安备 33010602011771号