Copy link to clipboard
Copied
I'm trying to implement a solution for "ungraceful" disconnects from my app, such as when the browser window crashes or the network connection drops. For RTMP connections everything is pretty easy, but for RTMFP connections to the server, it's a bit more difficult.
In my main.asc file I've tried using Client.ping() as well as trying Client.getStats() and checking the ping_rtt time, but they both don't work as expected with RTMFP (it appears that the client is still alive when it is not). At the moment I'm using a reverse-RPC call and having the server call a method on the client and waiting for a response...it works ok but I'm not sure that's the best solution. Is there a way to configure auto-disconnecting dropped RTMFP connection after a certain period using the xml config files?
Message was edited by: Rich Rodecker - Changed Thread title
Copy link to clipboard
Copied
actually, I may have spoke too soon about the reverse-RPC working properly...the onStatus() of my Responder object never gets called when a client disappears.
Copy link to clipboard
Copied
Rich, I see you posted this over 2 years ago. So I understand if you don't remember.
When you tested Client.ping() in this scenario with disconnected client, what sort of ping_rtt time did AMS return?