"Packet size" for long polling connections

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

"Packet size" for long polling connections

Alan Guegan
Bonjour à tous,

I am creating a proof of concept to enable long http connections between a tomcat server and java clients, through an http proxy connection.

I have used the twitter example (not REST) to build the server side, and async http client for the client side.

My concern is that I need to send big messages from server to client (> 400 000 Kb), and on the client side I receive the original message in small parts. When I send through http, no real problem as the "packet size" is always 8192, except when the message is ending.
But when I use https, the onBodyPartReceived() sends me data with variable length. I have no clue how to recollect message parts, except if I add "manually" one header + message size checking.

Do you have another solution for managing "big" message handling ?

Thank you,
Alan
Reply | Threaded
Open this post in threaded view
|

[[atmosphere-users]] Re: "Packet size" for long polling connections

Jeanfrancois Arcand-4
Salut,

désolé du retard...

can you elaborate on your usage of the AHC library? AHC's AsyncHandler
gets invoked as soon as bytes get received. Hence you need to
"accumulate" the response (Take a look at the ResponseBuilder object).

Thanks

-- Jeanfrancois

On 11-08-28 1:46 AM, Alan Guegan wrote:

> Bonjour à tous,
>
> I am creating a proof of concept to enable long http connections
> between a tomcat server and java clients, through an http proxy
> connection.
>
> I have used the twitter example (not REST) to build the server side,
> and async http client for the client side.
>
> My concern is that I need to send big messages from server to client
> (> 400 000 Kb), and on the client side I receive the original message
> in small parts. When I send through http, no real problem as the
> "packet size" is always 8192, except when the message is ending.
> But when I use https, the onBodyPartReceived() sends me data with
> variable length. I have no clue how to recollect message parts, except
> if I add "manually" one header + message size checking.
>
> Do you have another solution for managing "big" message handling ?
>
> Thank you,
> Alan