cordova-plugin-websocket-server icon indicating copy to clipboard operation
cordova-plugin-websocket-server copied to clipboard

Frame size

Open vogloblinsky opened this issue 7 years ago • 5 comments

I try to send a JSON object with a web client inside one application, connected to the server running on another app. With a very light JSON all is working fine. With a very big JSON (6Mb) the client got an 1006 error (Close Event).

Did this issue comes from the implementation of Websocket inside cordova webview ? or on the server side ?

Thanks

vogloblinsky avatar Dec 27 '17 09:12 vogloblinsky

Updates about my previous question. I try to connect my websocket client app to a Node.js websocket server using this package (https://github.com/theturtle32/WebSocket-Node). With the default settings, i got a 1009 error : "Frame size of 131072 bytes exceeds maximum accepted frame size" Upgrading the options maxReceivedFrameSize and maxReceivedMessageSize i was able to send a big message over the wire.
https://github.com/theturtle32/WebSocket-Node/blob/master/docs/WebSocketServer.md#server-config-options

So is it possible to tweak the server settings on this plugin to increase the sizes of messages ?

Thanks

vogloblinsky avatar Dec 28 '17 08:12 vogloblinsky

it isn't possible at the present time. but I'll have a look

becvert avatar Dec 28 '17 09:12 becvert

could you tell me if you have the issue on both a Android server and a iOS server. Thank you.

becvert avatar Dec 28 '17 13:12 becvert

I have just made a test with an Android app with this plugin running. Light message works fine, very big doesn't. But i don't have the 1006 error, just no callback message inside the console.log inside the app server.

vogloblinsky avatar Dec 28 '17 14:12 vogloblinsky

I won't fix that for the moment. Maybe ever. Please PR if you can. Anyone's help is welcomed otherwise.

becvert avatar Jan 02 '18 14:01 becvert