You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by John Sheehy <jo...@voxer.com> on 2013/01/29 03:24:39 UTC

Question on SSL packet size

Hey all,

I'm using a standard Https connection w/ chunked encoding, trying to write
small chunks to a secure socket. I setup an InputStreamEntity that
httpclient reads from as the bytes become available. It typically reads
40-50 bytes, which is fine, but seems to do the socket/tcp write in much
larger chunks. On my receiving end, I usually read 2K in one read() and 45
bytes (ish) in another one following it immediately.

some points:

- I've enabled NODELAY
- I've noticed in the code that ChunkedOutputStream seems to buffer 2048
bytes by default. Is there any way to alter this ?

I've recompiled that to change this value to something smaller, and things
are much better over plain http, but still in https, it seems to be sending
large packets. Is there some way I can get the SSL socket layer to send in
smaller packets?

Thanks
John