Tlantic / cdv-socket-plugin

Cordova Socket Plugin
GNU General Public License v3.0
51 stars 43 forks source link

Can't receive anything until disconnect (Android) #76

Open andrepsc3011 opened 9 years ago

andrepsc3011 commented 9 years ago

connected to some server, server sent some data to android app, but the “SOCKET_RECEIVE_DATA_HOOK” event won't trigger util a disconnection is made by cdv-socket-plugin. Can anyone help me?

ericwang0701 commented 9 years ago

Hi @andrepsc3011

I also encounter the same issue. Have you find a solution?

The weird thing is that when I implemented the TCP server on iPhone, the Android tcp client (Cordova) can receive the data correctly. However, when I used the NodeJS tcp server, the Android tcp client (Cordova) can only receive data when it disconnect. Since I test the server code with another NodeJS tcp client, tI'm pretty sure the server code is correct.

andrepsc3011 commented 9 years ago

Hello @ChengYaoWang , I have not found a solution. I implemented my server in an embedded system with a wifi Bluegiga module wf-121. The server works fine, but I'm still trying to discover why the client only receives data after disconnecting. Sorry!