Current WebSockets::sendText method takes a String input, converts it to byte[], wraps it in ByteBuffer and delegates to private method sendInternal
I'm developing a server that repeatedly sends same text message to several thousands websockets and all this conversions add up. Would it be possible to add this method variant, taking a byte[] of UTF-8 encoded text:
public static void sendText(byte[] message, WebSocketChannel wsChannel, WebSocketCallback<Void> callback) {
ByteBuffer data = ByteBuffer.wrap(message);
sendInternal(new ByteBuffer[]
, WebSocketFrameType.TEXT, wsChannel, callback);
}