onTextMessage

suspend fun onTextMessage(text: CharSequence, isLast: Boolean = true)

Callback for text messages (potentially partial frames).

The given text CharSequence can be reused right after this method returns.

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.Text 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.