flash - Monitor browser tabs with localConnection and sense when a user closes a tab -


In my application the browser window connects with the server with long-term poling (comet) if the user opens multiple browser tabs , Then only one of them (called Master) communicates with the server and acts as a proxy for the other tab. I want to use Flash Local Connection to exchange data between tabs.

What happens when the user closes the master tab that keeps the comet session? I can use Javascript with an unload event to notify other tabs, which are closing the master tab and then closes the local connection, but the unload event is unreliable. I want to track the Master Tab Connection object I can use the ballot, but it's dirty talking.

When master is closed then one needs to become a master from the other tab. How do I ensure that one tries to become the master of them?

If a user closes the tab without flash, then if it is capable of closing the local connection, will this cause a memory leak?

Thanks

Identifier wire to handle searching by seeing as a local connection Uses the following solutions should work:

When the master tab closes, it indicates one of those slaves that it is doing this. Then it closes its local connection. Das can now register a new local connection with the same name, as the master was using it, the result of which is that the next time another slave has the old owner (old string Trying to contact), they would be able to talk to the 'new' master.

Similar effects can be achieved without support for unload event (if it is undesirable), when the user closes the master tab, then connect any app to a local connection Trying to use that would be an exception. Instead of throwing an error, the slave app can estimate that this exception means that the owner has stopped it, then it will take over the master roll and will register a new local connection with the same name of the master. The rest is as described above.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -