RFR: 8155902: DataOutputStream writeInt creates 2 packets instead of 1
Daniel Jeliński
djelinski at openjdk.org
Fri Jul 7 18:01:57 UTC 2023
On Fri, 7 Jul 2023 15:27:29 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Was it actually verified that things are not split up into two or more packets? It seems that `write(2)` could in fact return a value less than the number of bytes requested.
Yes, the test case included in JBS sends all 4 bytes in a single packet now.
We can't guarantee that every writeInt will always send all bytes in the same packet, but at least we won't send single-byte packets.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14791#issuecomment-1625766507
More information about the core-libs-dev
mailing list