Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Fwd: BOSH on ebmedded Jetty - server side.


On Tue, Jul 23, 2019 at 10:22 PM Sergey O <osnsergey@xxxxxxxxx> wrote:
> Here is the code in our custom HttpServlet (the same is for doPost):


The code is obviously a crude experiment but it is fundamentally correct.

> Our HTTP client sends several requests and doesn't wait for a response before sending the next request.
> We expect to get into this method before sending a response after 2000 mseconds but it never happens.

Your client cannot send a second HTTP/1.1 request on the same
connection, it must use another connection.

If it is not using another connection, then your client is wrong and
you will need to modify it.
If you missed this important detail, then likely you will have to fix
this problem and then likely fix a few other cases that have been
solved years ago by CometD, so basically you are reinventing the

I strongly suggest that you look into CometD: it will probably take
you less time to adapt your code to CometD than to implement a correct
client and a correct server.

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

Back to the top