Multiplayer Peer-to-Peer Connection Across Firewalls and Network Address Translators Using a Single Local Port on the Local Host
First Claim
1. A method of providing peer-to-peer connection among a plurality of host devices disposed behind corresponding network address translators, the method comprising:
- providing a plurality of STUN servers;
for each host device to be connected, providing a first socket bound to a first private port and a second socket bound to a second private port;
for each host device to be connected, sending a first STUN packet through the first socket to a first STUN server of the plurality of STUN servers via a public port of the corresponding network address translator, the public port having a public port number identified by the first STUN server;
for each host device to be connected, sending a second group of STUN packets through the second socket to the plurality of STUN servers via one or more public ports of the corresponding network address translator, the second group of STUN packets being equal in number to the STUN servers, the one or more public ports being different from the public port for the first socket, each of the one or more public ports having a public port number identified by the STUN servers; and
for each host device to be connected, calculating a predicted public port number of the corresponding network address translator for the second socket, based on the public port numbers of the public ports for the first socket and the second socket, the predicted public port number to be used for peer-to-peer connection between the second socket of the host device and other host devices.
0 Assignments
0 Petitions
Accused Products
Abstract
A system for providing peer-to-peer connections includes a plurality of host devices behind corresponding NATs; and a plurality of STUN servers. Each host device includes first and second sockets respectively bound to first and second private ports. Each host device sends a first STUN packet through the first socket to a first STUN server and a second group of STUN packets through the second socket to the STUN servers via public ports of the corresponding NAT. The STUN servers identify the public port numbers of the public ports. Each host device calculates a predicted public port number of the corresponding NAT for the second socket, based on the public port numbers of the public ports for the first socket and the second socket, the predicted public port number to be used for peer-to-peer connection between the second socket of the host device and other host devices.
-
Citations
1 Claim
-
1. A method of providing peer-to-peer connection among a plurality of host devices disposed behind corresponding network address translators, the method comprising:
-
providing a plurality of STUN servers; for each host device to be connected, providing a first socket bound to a first private port and a second socket bound to a second private port; for each host device to be connected, sending a first STUN packet through the first socket to a first STUN server of the plurality of STUN servers via a public port of the corresponding network address translator, the public port having a public port number identified by the first STUN server; for each host device to be connected, sending a second group of STUN packets through the second socket to the plurality of STUN servers via one or more public ports of the corresponding network address translator, the second group of STUN packets being equal in number to the STUN servers, the one or more public ports being different from the public port for the first socket, each of the one or more public ports having a public port number identified by the STUN servers; and for each host device to be connected, calculating a predicted public port number of the corresponding network address translator for the second socket, based on the public port numbers of the public ports for the first socket and the second socket, the predicted public port number to be used for peer-to-peer connection between the second socket of the host device and other host devices.
-
Specification