[Red5] appDisconnect and how to clear ghost connections

Alexey blink182fan at mail.ru
Sat May 12 08:56:18 EDT 2007


Joseph, what do you mean - "and then just before calling nc.close, I'd call this remote method"?
 nc.close must be called in client App??
  ----- Original Message ----- 
  From: joseph wamicha 
  To: Red5 at osflash.org 
  Sent: Saturday, May 12, 2007 12:42 PM
  Subject: Re: [Red5] appDisconnect and how to clear ghost connections


  Hi,

  If I remember well (although that was quite a couple of releases back - just before release 0.6), I found appDisconnect was only being called when browser window or tab is closed. 
  nc.close() was not triggering appDisconnect. 
  So I created a remote red5 application service method:

   public void disconnectUser(String connectionID)
      {
          IScope appScope = Red5.getConnectionLocal().getScope();
          ServiceUtils.invokeOnAllConnections (appScope, "removeClientID", new Object[] { connectionID } );
           //code to inform other clients that this client with this connection ID has left below...
    
  }

  and then just before calling nc.close, I'd call this remote method:

  nc.call("demoService.disconnectUser", nc_responder, this.clientUUID);

  Maybe it can help if you still having the appDisconnect problems.


  On 5/12/07, Alexey <blink182fan at mail.ru> wrote:
    Because it doesn't work :-) I'm creating videochat application, users's status is in database. I'm using onAppDisconnect method of ApplicationAdapter to change state to offline when user disconnects, but sometimes it doesn't work and i'm getting users with online state when they are offlline. So i got a question - if ghost connection detection code works when it finds a ghost connection what method is called on server? maybe it works, but it doesn't connected with onAppDisconnect... In FMS disconnect method is invoked in all cases. 
      ----- Original Message ----- 
      From: Steven Gong 
      To: Red5 at osflash.org 
      Sent: Saturday, May 12, 2007 7:38 AM
      Subject: Re: [Red5] appDisconnect and how to clear ghost connections


      Alexey


      On 5/11/07, Alexey <blink182fan at mail.ru> wrote: 
        I'm using firefox, but it doesn't matter. If someone unplug the cable, and
        connection disappear - i want to know about it. I've read about ghost
        connections detection code, but i think it doesn't work now... 

      The ghost connection detection code can detect the cable unplug case. Why do you think it doesn't work now? :-)



        ----- Original Message -----
        From: "Jason Powell" <jason at thepowells.ca>
        To: < Red5 at osflash.org>
        Sent: Friday, May 11, 2007 10:54 AM 
        Subject: Re: [Red5] appDisconnect and how to clear ghost connections


        > Are you using IE?  That's the only time I've seen appDisconnect not
        > get called (I wound up creating a disconnect method called via 
        > ExternalInterface from the document.onunload Javascript handler) when
        > the Flash movie disppears (Closing IE causes it to fire).
        >
        > Jason
        >
        > Alexey wrote:
        >> Hello, i've noticed that sometimes server doesn't invoke 
        >> appDisconnect when client disconnects, and if we got client status
        >> in database (offline, online) we got this one online... is there a
        >> way to detect this guys?
        >>
        >> ---------------------------------------------------------------------- 
        >>
        >> _______________________________________________
        >> Red5 mailing list
        >> Red5 at osflash.org
        >> http://osflash.org/mailman/listinfo/red5_osflash.org
        >
        >
        >
        > _______________________________________________
        > Red5 mailing list
        > Red5 at osflash.org 
        > http://osflash.org/mailman/listinfo/red5_osflash.org
        >
        >
        > __________ NOD32 2256 (20070510) Information __________
        >
        > This message was checked by NOD32 antivirus system.
        > http://www.eset.com
        >
        >


        _______________________________________________ 
        Red5 mailing list
        Red5 at osflash.org
        http://osflash.org/mailman/listinfo/red5_osflash.org




      -- 
      I cannot tell why this heart languishes in silence. It is for small needs it never asks, or knows or remembers.  -- Tagore 

      Best Regards
      Steven Gong 


--------------------------------------------------------------------------


      _______________________________________________
      Red5 mailing list
      Red5 at osflash.org
      http://osflash.org/mailman/listinfo/red5_osflash.org



      __________ NOD32 2258 (20070511) Information __________

      This message was checked by NOD32 antivirus system.
      http://www.eset.com



    _______________________________________________
    Red5 mailing list
    Red5 at osflash.org
    http://osflash.org/mailman/listinfo/red5_osflash.org





  -- 
  C is forever. 


------------------------------------------------------------------------------


  _______________________________________________
  Red5 mailing list
  Red5 at osflash.org
  http://osflash.org/mailman/listinfo/red5_osflash.org



  __________ NOD32 2258 (20070511) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20070512/35e7070c/attachment.htm


More information about the Red5 mailing list