tufanv Expert Licensed User Longtime User Mar 15, 2018 #1 Hello, The transmitted data from a websocket is exceeding the limits so i can't get the data: It gives this error: Code: org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [69727] exceeds maximum size [65536] How can this be solved ? Thanks
Hello, The transmitted data from a websocket is exceeding the limits so i can't get the data: It gives this error: Code: org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [69727] exceeds maximum size [65536] How can this be solved ? Thanks
LucaMs Expert Licensed User Longtime User Mar 15, 2018 #2 https://www.b4x.com/android/forum/threads/sending-binary-data-over-websocket.44776/#post-274162 Upvote 0
OliverA Expert Licensed User Longtime User Mar 15, 2018 #3 Try: Code: Dim ws As WebSocketClient ws.Initialize("ws") Dim jo As JavaObject = ws jo = jo.GetField("wsc") jo.RunMethod("setMaxTextMessageBufferSize", Array As Object (128000)) ws.Close Sources used: B4J_WebSocketClient GitHub repository (https://github.com/AnywhereSoftware...tware/b4j/objects/WebSocketClientWrapper.java) Jetty documentation on WebSocketClient (https://www.eclipse.org/jetty/javad...e/jetty/websocket/client/WebSocketClient.html) Upvote 0
Try: Code: Dim ws As WebSocketClient ws.Initialize("ws") Dim jo As JavaObject = ws jo = jo.GetField("wsc") jo.RunMethod("setMaxTextMessageBufferSize", Array As Object (128000)) ws.Close Sources used: B4J_WebSocketClient GitHub repository (https://github.com/AnywhereSoftware...tware/b4j/objects/WebSocketClientWrapper.java) Jetty documentation on WebSocketClient (https://www.eclipse.org/jetty/javad...e/jetty/websocket/client/WebSocketClient.html)
tufanv Expert Licensed User Longtime User Mar 15, 2018 #4 OliverA said: Try: Code: Dim ws As WebSocketClient ws.Initialize("ws") Dim jo As JavaObject = ws jo = jo.GetField("wsc") jo.RunMethod("setMaxTextMessageBufferSize", Array As Object (128000)) ws.Close Sources used: B4J_WebSocketClient GitHub repository (https://github.com/AnywhereSoftware...tware/b4j/objects/WebSocketClientWrapper.java) Jetty documentation on WebSocketClient (https://www.eclipse.org/jetty/javad...e/jetty/websocket/client/WebSocketClient.html) Click to expand... Thanks for the answer. This still gives the error: org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [70885] exceeds maximum size [65536] LucaMs said: https://www.b4x.com/android/forum/threads/sending-binary-data-over-websocket.44776/#post-274162 Click to expand... I think what OliverA replied here is the b4j implementation because there is no options in b4j version. But Oliver's did not work for me. Upvote 0
OliverA said: Try: Code: Dim ws As WebSocketClient ws.Initialize("ws") Dim jo As JavaObject = ws jo = jo.GetField("wsc") jo.RunMethod("setMaxTextMessageBufferSize", Array As Object (128000)) ws.Close Sources used: B4J_WebSocketClient GitHub repository (https://github.com/AnywhereSoftware...tware/b4j/objects/WebSocketClientWrapper.java) Jetty documentation on WebSocketClient (https://www.eclipse.org/jetty/javad...e/jetty/websocket/client/WebSocketClient.html) Click to expand... Thanks for the answer. This still gives the error: org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [70885] exceeds maximum size [65536] LucaMs said: https://www.b4x.com/android/forum/threads/sending-binary-data-over-websocket.44776/#post-274162 Click to expand... I think what OliverA replied here is the b4j implementation because there is no options in b4j version. But Oliver's did not work for me.
OliverA Expert Licensed User Longtime User Mar 15, 2018 #5 Try Code: Dim ws As WebSocketClient ws.Initialize("ws") Dim jo As JavaObject = ws jo = jo.GetField("wsc") jo = jo.RunMethod("getPolicy", Null) jo = jo.RunMethod("setMaxTextMessageSize", Array As Object (128000)) Additional source: (https://www.eclipse.org/jetty/javad...bSocketPolicy.html#setMaxTextMessageSize-int-) Note: Do this before calling connect method. Upvote 0
Try Code: Dim ws As WebSocketClient ws.Initialize("ws") Dim jo As JavaObject = ws jo = jo.GetField("wsc") jo = jo.RunMethod("getPolicy", Null) jo = jo.RunMethod("setMaxTextMessageSize", Array As Object (128000)) Additional source: (https://www.eclipse.org/jetty/javad...bSocketPolicy.html#setMaxTextMessageSize-int-) Note: Do this before calling connect method.
tufanv Expert Licensed User Longtime User Mar 15, 2018 #6 OliverA said: Try Code: Dim ws As WebSocketClient ws.Initialize("ws") Dim jo As JavaObject = ws jo = jo.GetField("wsc") jo = jo.RunMethod("getPolicy", Null) jo = jo.RunMethod("setMaxTextMessageSize", Array As Object (128000)) Additional source: (https://www.eclipse.org/jetty/javad...bSocketPolicy.html#setMaxTextMessageSize-int-) Note: Do this before calling connect method. Click to expand... This one works perfect ! Thanks Upvote 0
OliverA said: Try Code: Dim ws As WebSocketClient ws.Initialize("ws") Dim jo As JavaObject = ws jo = jo.GetField("wsc") jo = jo.RunMethod("getPolicy", Null) jo = jo.RunMethod("setMaxTextMessageSize", Array As Object (128000)) Additional source: (https://www.eclipse.org/jetty/javad...bSocketPolicy.html#setMaxTextMessageSize-int-) Note: Do this before calling connect method. Click to expand... This one works perfect ! Thanks