4 Replies Latest reply on Apr 18, 2012 12:21 AM by Somebbb

    NetGroup.Neighbor.Disconnect receiving order

    Somebbb Level 1

      As i understand, NetGroup.Neighbor.Disconnect receiving order is always random? Because of route selection for each disconnection message?

       

      For example user closed page and users starting to receive messages about Neighbor disconnection, i want one channel to be notified faster than others.

       

      Is it possible?

        • 1. Re: NetGroup.Neighbor.Disconnect receiving order
          Michael Thornburgh Adobe Employee

          no.

           

          NetGroup.Neighbor.Disconnect events should come in the order in which the neighbors are actually disconnecting, as detected by the receiver of that event. that event is generated locally based on the low-level neighbor disconnection.

          • 2. Re: NetGroup.Neighbor.Disconnect receiving order
            Somebbb Level 1

            But how to control channel closing on user browser closing? I can imagine only delayed check.

            • 3. Re: NetGroup.Neighbor.Disconnect receiving order
              Michael Thornburgh Adobe Employee

              i'm not sure i understand what you're asking exactly.

               

              when the user closes his browser, the RTMFP in that browser will try to send session close messages to all of its peers in the short time it has between the browser close and Flash Player being destroyed.

               

              as each peer receives the session close message, it will tear down any associated information about the session with the closed peer. that's where the NetGroup.Neighbor.Disconnect message comes from.

               

              the peers in the group are not synchronized in any way. there is no way to control which one of them will receive and process the close message first.

               

              if the session close message is lost for a particular peer (which can happen since that message isn't sent reliably), then that peer will eventually time out the connection to the closed peer. that can take up to a minute to notice.

              • 4. Re: NetGroup.Neighbor.Disconnect receiving order
                Somebbb Level 1

                For example i have 10 groups, one of them is marked as main group and 9 others as simple groups.

                10 users are inside all of 10 groups, one of them closed browser.

                All 9 users need to know if that 10-th user really have closed the browser or just left one of the channel(s).

                 

                NetGroup.Neighbor.Disconnect events doesn't come in array type, they come in one by one and i can't know if user left all channels. So only solution for me now, is to make setTimeout(function(){Check if that user left all 10 channels===total exit},1000).

                 

                There can be two types of NetGroup.Neighbor.Disconnect, one is manual - channel closed by user(clicking on the close button) and browser close.

                How can i figure out if that was manual close or total browser close?

                I'm implementing multi-client application, so that could be one of the clients exit(browser closed) or just manual channel exit.