0

My app works all fine, till the user on mobile (iOS iPad in my case) disconnect due to app change and come back. I have no idea what happens next, if the socket tries to reconnect. I would debug this myself, but I don't have Mac to debug this nor Android (I have WP).

I need the reconnect client to get all the changes that happened between his reconnection and reconnection.

  • Is there any event called?
  • Should I call one? When?

I only do care about few browsers: Chrome (desctop, Mac, iOS) and Safary (Mac, iOS)
Site (just for debugging purposes): study.eise.cz

Akxe
  • 9,694
  • 3
  • 36
  • 71
  • you need to memorize all the changes along with a timestamp. then, you can just feed them all the changes, sliced as the point after their last known message. – dandavis Nov 13 '15 at 22:28
  • But what event is called? I have no idea how to know a user have reconected – Akxe Nov 13 '15 at 22:29
  • there's many, depending on your exact need; socket.connect and window.focus come to mind... – dandavis Nov 13 '15 at 22:34
  • If i do ˙socket.connect˙ while coneccted, what happends? New connection? or Is there a way to check if I am still connected? – Akxe Nov 13 '15 at 22:40
  • you don't call the event from your code, the event calls your code at the right time. – dandavis Nov 13 '15 at 22:43
  • Sorry but I am lost... could you do a tiny example as answer? – Akxe Nov 13 '15 at 22:48
  • http://stackoverflow.com/questions/20685208/websocket-transport-reliability-socket-io-data-loss-during-reconnection – dandavis Nov 13 '15 at 22:50

0 Answers0