0

I am using Autobahn library for web socket connection. My backend server is php.

I am facing WebSockets connection lost issue very frequently when i have started socket connection.

How to overcome this issue? Is there any way to connect to socket again without informing user.

Dhrupal
  • 1,863
  • 1
  • 23
  • 38

1 Answers1

0

Currently there is no auto reconnect option for Autobahn Android, you need to manually open a new connection in the onClose callback on the client.

UPDATE: Looking through the Autobahn code on github I noticed the WebSocketConnection#reconnect() method, seems to be included in releases 0.5.1 and 0.5.2, but it is not documented in the API documentation on the Autobahn website.

johlo
  • 5,422
  • 1
  • 18
  • 32