on Binary Message
Callback for binary messages (potentially partial frames).
Use this overload when the data of the frame can be safely wrapped without copy into a ByteString for processing. If the data is provided as a reusable buffer that must be consumed/copied, use the other overload to write directly to the Sink buffer to avoid copying data around.
If isLast is true, the web socket frame is considered complete and the full (aggregated) message is sent to the incomingFrames flow as a WebSocketFrame.Binary frame. Otherwise, the message is simply appended to a buffer and nothing happens in the incomingFrames flow. More partial messages are expected in this case.
Callback for binary messages (potentially partial frames).
Use this overload when the data of the frame is provided as a reusable buffer that must be consumed/copied, and use writeData to transfer bytes from the received buffer into this adapter's buffer. If the data of the frame can be safely wrapped without copy into a ByteString for processing, use the other overload taking a ByteString as parameter.
If isLast is true, the web socket frame is considered complete and the full (aggregated) message is sent to the incomingFrames flow as a WebSocketFrame.Binary frame. Otherwise, the message is simply appended to a buffer and nothing happens in the incomingFrames flow. More partial messages are expected in this case.