Thomas Ahle
Thomas Ahle

Reputation: 31594

Using Java NIO for pipelined Http

Researching the web, I've found 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?

Upvotes: 3

Views: 2056

Answers (2)

Mathias
Mathias

Reputation: 36

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.

Upvotes: 2

Susan
Susan

Reputation: 11

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

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

Upvotes: 1

Related Questions