Skip to content

HydraChannel netStatus update #5

Description

@devboy

Many thanks for giving away this great library – it really serves as a fantastic starting point!
I notice a mention of an issue with Hydra’s error handling here:
http://forums.adobe.com/thread/824327?tstart=0

especially in light of the fp bug and what is sometimes needed to actually allow a site to use P2P (http://www.flashrealtime.com/resolving-netgroupconnectrejected-or-when-your-flash-p2p-apps-stop-working/)

I made a very small edit in the HydraChannel class around line 161.. i reordered the top of the switch statement and separated the handling of rejected/failed and success:

private function netStatus(event : NetStatusEvent) : void
{
var infoCode : String = event.info.code;
switch (infoCode)
{

  case NetStatusCodes.NETGROUP_CONNECT_REJECTED:
  case NetStatusCodes.NETGROUP_CONNECT_FAILED:
      trace(‘CONNECTION ERROR: ‘+infoCode);
      break;
  case NetStatusCodes.NETGROUP_CONNECT_SUCCESS:
      if (event.info.group && event.info.group == _netGroup)
      {

does this make sense?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions