在Java NIO中使用Google Protocol Buffers? [英] Using Google Protocol Buffers with Java NIO?
问题描述
我目前正在玩 java.nio
,这是我很久没有使用的了。我使用 Google协议缓冲区进行序列化以及与系统其他部分进行通信。现在我无法弄清楚是否/如何使用 java.nio
类来使用protobuffers。
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.
我无法想象Google只使用网络协议缓冲区的每个连接一个线程。谁能给我一个关于如何整合这两个的指针?
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?
提前致谢!
Martin
Thanks in advance!
Martin
推荐答案
我建议 Netty ,特别是这个示例即Netty使用ProtoBufs。
I suggest Netty, specifically this example that is Netty using ProtoBufs.
这篇关于在Java NIO中使用Google Protocol Buffers?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!