P2P Function #2
It is easier to send P2P messages across computers using UDP compared to TCP.
However, UDP by nature is not reliable – does not guarantee delivery and delivery in order.
In case of chatting between clients, some messages could be lost. ProudNet solves this problem
by including ARQ (Automatic Repeat-reQuest) mechanism that is similar to TCP method.
Hole-punching is essential for stable P2P communication. It is more important that hole- punching is maintained
over an extended period time in a network with lots of P2P connections and high volume of traffic.
In case of Internet cafes and some places in China, there are hundreds of computers connected to a single router.
In this case, large amount of P2P traffic could fill up router’s port mapping entry list and cause disconnections. ProudNet is equipped with
- Just-in-time hole-punching
- Port mapping reuse
- Technology to avoid duplicate port mapping entries
Hole-punching for P2P can evaporate any time with traffic and certain status of NAT routers.
If not handled properly, it could cause issues to players, such as co-player(s) suddenly not moving.
ProudNet detects good and bad P2P connections and switches hole-punching and relays to avoid this issue.
When hole- punching is suddenly cleared for whatever reason, small latency would happen instead of a disconnection. So, developers using ProudNet can safely assume P2P connection is always stable in developing a game.
- Once a P2P group is formed, the user’s messaging is processed
as a relay and attempts to hole-punch internally.
- If hole punching is successful, it directly performs messaging afterwards.
- Therefore, users can do P2P communication directly afterwards,
without having to wait after establishing P2P group.
It is because relay/hole punching switching is possible internally on its own.