0

I need to increase to increase the max text message buffer size of websockets. I need to send many messages which are too large. Please do you have any suggestions how to do so?

lost_in_the_source
  • 10,998
  • 9
  • 46
  • 75
Ri Hab
  • 49
  • 5

1 Answers1

0

When you use Jetty's default WebSocketServletFactory like...

@Override
public void configure(WebSocketServletFactory factory) {
    factory.getPolicy().setIdleTimeout(600000);
    factory.register(Socket.class);
}

you can simple change the message buffer size in...

factory.getPolicy().setMaxTextMessageBufferSize(int size);

See also whole API: apidocs/org/eclipse/jetty/websocket/api/WebSocketPolicy

Here are more informations about jetty's websocket-server: eclipse.org/jetty/documentation

loopX2
  • 21
  • 1
  • 5