Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Send HTTP/2 requests at the same time


On Sat, Sep 12, 2015 at 9:27 AM, Muhui Jiang <jiangmuhui@xxxxxxxxx> wrote:
> Does anyone know how to send the request at the same time without waiting
> for the former request's response. Many Thanks

Just send them in a loop without waiting for the responses:

for (int i = 0; i < 100; ++i)
    HeadersFrame frame = ...;
    session.newStream(headersFrame, new Promise.Adapter<Stream>(), new

That's it.

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.

Back to the top