How does a peer to peer file transfer work?

The sending device will first contact a STUN server to get some network information about itself such as it's IP address.

The details are then sent via a signaling server to the receiving device.

A signalling server is required to allow the devices to communicate until they have enough information to open a direct connection between each other.

The two devices will exchange a few messages via the signaling server to attempt to establish a direct connection.

If the devices manage to open a connection the devices can now transfer the file via their direct connection.

If you are looking for some test files to try things out with; we have a set of test files for download.

When would a peer to peer file transfer fail?

Browser support

Facilitating a peer to peer connection in the browser requires features which aren't supported by all browsers. Internet Explorer does not support the features required and Firefox has a download size which is limited by the amount of memory the receiving device has. Chrome has full support.

Network connectivity

Most mobile carriers do not provide a publicly accessible network address (IP address). Since both devices will try initiating a connection this isn't an issue if just one of the devices is on a mobile network but the devices may not be able to connect if they are both on a mobile network. Some home networks may also have this issue.

Mobile devices connected via Wi-Fi are more likely to succeed.