ProudNet’s P2P communication is powerful! It has more than just general hole-punching and relay method.
ProudNet is
In ProudNet, each peers can do messaging once user request P2P communication connecting (Proud.CNetServer.CreateP2PGroup or Proud.CNetServer.JoinP2PGroup). However if hole-punching is not done yet between peers, messaging between peers are only relaying through server. During operation of messaging between peers, it is doing hole-punching at the same time. And if hole-puching is succeed, P2P communication channel will be changed to direct from relay. This called “first hole-punching next relay” It makes no waiting time when game room starts.
Also it is safe when it is doing connect/disconnect P2P repeatly for location syncrozing using P2P between visible characters in MMORPG game.
Some model of NAT device loss address mapping because it handle external address mapping for internal address incorrectly. ProudNet has different UDP socket between peers to get immunity of those.
Sometimes it does not overcome overloaded traffic even it succeed to hole-punching in home computing environment using like ADSL or ADSL2+
Computer or NAT device on sender side is not working correctly.
ProudNet can solve that itselves. If traffic is increaded because one peer multicast too many peers, ProudNet will dectect it and distribute multicast to relay server.
There is “Port prediction method” for NAT hole-punching. This method make possible to hole-punching between symmetric NAT devices but has disadvantage as too many port mapping.
To reduce adverse effect, ProudNet slowly change to offensive hole-punching technique like predict port instead heavy hole-punching. Therefore it takes longer (normally few ten seconds) with some NAT devices but this does not occuring problem. Because it can be messaging between peers as first hole-punching then relay technique.
ProudNet only try hole-punching when it nessaccary. Therefore it reduces disappearing mapping information on NAT devices that has limited address mapping number. For example, if it connected with P2P that does not communicate each other, it will not do hole-punching process.
Here is the reason why Proud.RmiContext.m_relayed, Proud.CNetClientInfo.m_RelayedP2P and Proud.CNetPeerInfo.m_RelayedP2P are false right after calling Proud.CNetServer.CreateP2PGroup Proud.CNetServer.JoinP2PGroup. After starting P2P communication, these values will be changed to true.