I am new to websockets and when I tried to pass a JSON
with a length greater than 8192
, the websocket disconnected immediately. However JSON
with length <= 8191
works fine.
Is there any MAX SIZE/ LIMIT
of data that can be passed through a WebSocket
? if yes, what's that size?
I FIXED THE ERROR BY ADDING THESE LINES TO my web.xml
<context-param>
<param-name>org.apache.tomcat.websocket.textBufferSize</param-name>
<param-value>32768</param-value>
</context-param>
<context-param>
<param-name>org.apache.tomcat.websocket.binaryBufferSize</param-name>
<param-value>32768</param-value>
</context-param>
Thanks @Davide Lorenzo MARINO.