Using Google Protocol Buffers with Java NIO?

血红的双手。 提交于 2020-01-01 11:56:52

问题


I'm currently playing around with java.nio, which I haven't been using for a long time. I use Google Protocol Buffers for serialization and for communication with other parts of my system. Now I can't figure out if/how it is possible to get use protobuffers with java.nio classes.

I can't imagine that Google is using only "one thread per connection" with networked protocol buffers. Could anyone give me a pointer on how to integrate the two?

Thanks in advance!
Martin


回答1:


I suggest Netty, specifically this example that is Netty using ProtoBufs.



来源:https://stackoverflow.com/questions/3337805/using-google-protocol-buffers-with-java-nio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!