HydraP2P
HydraP2P copied to clipboard
HydraChannel netStatus update
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?