Pregunta

I'm trying to handle a WS connection loss on the android system and, following the error code, try to reopen the connection, reset the client, etc...

So I actually want to test my handling process, in the Autobahn refs, I have all the possible connection loss messages in the de.tavendo.autobahn.WebSocket.ConnectionHandler reference and I would like to know how to generate those events, I know how to generate the CLOSE_CONNECTION_LOST and the CLOSE_INTERNAL_ERROR events but I don't have any idea about the 3 others (CLOSE_NORMAL seems not to happen after calling the WebSocket disconnect() method).

Is it possible?

Regards.

¿Fue útil?

Solución

You can follow the code from here to the "outside". E.g. CLOSE_INTERNAL_ERROR is triggered from here, when something fatal happens during the initial creating of background reader/writer threads.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top