Detecting disconnection

rejwan
edited March 2011 in Flash (deprecated)
Hey I've recently started using the Flash Photon API and was wondering how I can detect when a connection is closed.
Thanks,
Ron

Comments

  • Well I found a simple workaround for the time being, on my Photon extender class, I've added the following event listener:
    mSocket.addEventListener(Event.CLOSE, onSocketClose);

    And I simply raise the event forward, but I was wondering if there was already an event that's being raised directly from Photon.
  • This is actually the best way to do it.
    We think about defining our own event as replacement and make it more accessible.