Hi Simon,
On 05/03/2025 22:05, Simon Fischer wrote:
But back to the actual problem here: Websockets, as any layered network protocol, need to be transparent. I transfer a binary message (which is a byte blob, in case of the WebSocket API its a ByteBuffer) to the websocket layer, which uses the WS protocol on top of TCP on top of IP on top of ethernet/wifi/5G/whatever to transport it to the reciever. And on the other and, another websocket layer removes all the things around and again just delivers a byte blob to the application. That final byte blob must have the exact same content as the original one, or the protocol is unusable. And this expectation is what the bug violates. The byte order of the source buffer is just a hint for extracting multi-byte values from it. It cannot influence the byte blob recieved by the communication partner.
This is a good point. I have logged https://bugs.openjdk.org/browse/JDK-8351339 best regards, -- daniel