HeimgardTechnologiesAS / cordova-plugin-advanced-websocket

MIT License
27 stars 18 forks source link

in android truncate receive message #22

Open Rezaasghariir opened 2 years ago

Rezaasghariir commented 2 years ago

it work well on browser but in android that truncate receive message. my code is this: var ip = '192.168.1.102' var wsOptions = { url: 'ws://' + ip + ':81', timeout: 5000, pingInterval: 10000, // headers: {"Authorization": "Bearer " + accessToken}, acceptAllCerts: false, };

CordovaWebsocketPlugin.wsConnect( wsOptions, function (recvEvent) { // console.log( // // "Received callback from WebSocket: " + recvEvent["callbackMethod"] // ); if (recvEvent["callbackMethod"] == "onMessage") { store['commit']('SOCKET_ONMESSAGE', recvEvent["message"]) } }, function (success) { console.log("Connected to WebSocket with id: " + success.webSocketId, success); store['commit']('SOCKET_ONOPEN', success) }, function (error) { console.log( "Failed to connect to WebSocket: " + "code: " + error["code"] + ", reason: " + error["reason"] + ", exception: " + error["exception"] ); } );