Is it possible to read an entire frame of data (On server or client side) using Java's websocket implementation ? Assume the message has a maximum size of about 200 bytes (variable length) If we can only read Byte by byte, then we need some way of 'figuring out' that this is a new packet and not a fragment of a previous packet. Which means a start of frame header must be appended to the "actual payload"
            Asked
            
        
        
            Active
            
        
            Viewed 129 times
        
    0
            
            
        - 
                    It's not possible to do anything *but* read an entire frame of data. It's a messaging interface, not a stream. When you get a message notification you are already provided with the entire message. – user207421 Sep 13 '21 at 06:19
 - 
                    That's how i figured it should be till i saw implementations like this which seem to read byte by byte https://stackoverflow.com/questions/9520911/java-sending-and-receiving-file-byte-over-sockets – user2579782 Sep 13 '21 at 17:43