RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v4]
Michael McMahon
michaelm at openjdk.org
Fri Mar 21 12:10:13 UTC 2025
On Fri, 21 Mar 2025 11:38:29 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java line 145:
>>
>>> 143:
>>> 144: /**
>>> 145: * Positions the {@link #offset} at 0, which is needed for vectorized masking, by masking necessary amount of bytes.
>>
>> Suggestion:
>>
>> * Applies up to 3 remaining from the previous pass bytes of the mask and
>> * positions the {@link #offset} at 0, which is needed for vectorized masking,
>> * by masking necessary amount of bytes.
>
> @Michael-Mc-Mahon, I'm fine with the change, though doesn't this obsolete the `by masking necessary amount of bytes` statement at the end?
Sure, feel free to alter the suggestion. I really just wanted the original point about "up to 3 remaining from the previous pass" bit retained.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24033#discussion_r2007454639
More information about the net-dev
mailing list