Patent ID: 8055771

Claim:
A network traversal method, for establishing a connection between a first endpoint and a second endpoint among a plurality of endpoints, the network traversal method comprising: deploying an on-line server, wherein each of the endpoints respectively registers a registration information in the on-line server and keeps an on-line state with the on-line server; grouping the endpoints according to the registration information of the endpoints, wherein the first endpoint is inside a first network address translator (NAT), the second endpoint is inside a second NAT, the endpoints inside the first NAT are grouped into a first group, and the endpoints inside the second NAT are grouped into a second group; determining whether there is an available connection between the endpoints grouped into the first group and the endpoints grouped into the second group; when there is the available connection, establishing the connection between the first endpoint and the second endpoint by using the available connection; determining whether the first NAT and the second NAT are respectively a full cone NAT, a restricted cone NAT, a port restricted cone NAT, or a symmetric NAT; establishing a peer-to-peer direct connection between the first endpoint and the second endpoint by using a second connection mode when the first NAT and the second NAT are respectively the full cone NAT, the restricted cone NAT, or the port restricted cone NAT; and establishing the peer-to-peer direct connection between the first endpoint and the second endpoint by using the second connection mode when one of the first NAT and the second NAT is the symmetric NAT and another one of the first NAT and the second NAT is the full cone NAT or the restricted cone NAT, wherein the second connection mode includes a port prediction mode or a hole punching mode.