D devmobile Active Member Licensed User Jun 8, 2017 #1 Hello I connect to server with socket in my project I dont have any problem until my connection lost. When i lost connection(wifi or data),aslo socket lost Now how i keep connection after i connect to wifi or data? Last edited: Jun 8, 2017
Hello I connect to server with socket in my project I dont have any problem until my connection lost. When i lost connection(wifi or data),aslo socket lost Now how i keep connection after i connect to wifi or data?
Daniel-White Active Member Licensed User Longtime User Jun 8, 2017 #2 I don't understand this "I don't have any problem unit my connection lost. " unit?? Upvote 0
D devmobile Active Member Licensed User Jun 8, 2017 #3 Daniel-White said: I don't understand this "I don't have any problem unit my connection lost. " unit?? Click to expand... I'm sorry,i edit it Upvote 0
Daniel-White said: I don't understand this "I don't have any problem unit my connection lost. " unit?? Click to expand... I'm sorry,i edit it
Erel B4X founder Staff member Licensed User Longtime User Jun 9, 2017 #4 You should try to connect again. Initialize Socket and call the connect code again. You can use Sleep is a loop to try to reconnect every 10 seconds until successful. Upvote 0
You should try to connect again. Initialize Socket and call the connect code again. You can use Sleep is a loop to try to reconnect every 10 seconds until successful.
D devmobile Active Member Licensed User Jun 9, 2017 #5 Erel said: You should try to connect again. Initialize Socket and call the connect code again. You can use Sleep is a loop to try to reconnect every 10 seconds until successful. Click to expand... Your means is : B4X: Do While True reconnect socket sleep(5000) Loop Is that right? Upvote 0
Erel said: You should try to connect again. Initialize Socket and call the connect code again. You can use Sleep is a loop to try to reconnect every 10 seconds until successful. Click to expand... Your means is : B4X: Do While True reconnect socket sleep(5000) Loop Is that right?