开发者

Using Java NIO for pipelined Http

Researching the web, I've found 开发者_StackOverflow中文版that pipelined HTTP is much faster and more power efficient (specially for mobile devices) than queued or parallel connections. The support from general libraries however seams to be small. Just recently has the widespread Apache HttpCore project gained support through its NIO module.

At least it says so on Wikipedia and a few places in the documentation. My problem is, that I have been unable to find any examples or tutorials on how to use this for sending simple piped requests. Neither the HttpCore NIO docs, nor Google codesearch has given me anything looking like Http pipelining.

Can you give me a simple example on how to use this module for sending two gets in a pipe and responding two their answer?


I would wait till Android gets a proper implementation built in. If Google hasn't bothered using it, it might just not be worth all the trouble.


I'm taking a serious look at this right now:

http://www.java2s.com/Code/Java/Network-Protocol/HttpgetwithCharBufferandByteBuffer.htm

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜