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?
Asked
Active
Viewed 1,323 times
0
-
What framework are you using for websockets? – childofsoong Feb 06 '17 at 23:00
-
org.eclipse.jetty.websocket – Ri Hab Feb 06 '17 at 23:07
1 Answers
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