Discord Twitter Youtube
<< Back

WebRTC & the ICE protocol WebRTC & the ICE protocol

WaveNet8//Send uses WebRTC

Direct file transfer between sender and receiver, without a third party in between, has many advantages especially in the area of privacy and data protection. Also, applications that work directly in the browser have many advantages since no application needs to be installed. The obvious solution is to combine the two. However, data transfer directly in the browser reduces the available technological options. But WebRTC with the ICE protocol is not only used for audio and video transmission, it can also be used to transfer data. Here is an insight into how this protocol works.

WebRTC without limitations: How the ICE protocol works

The Interactive Connectivity Establishment (ICE) protocol is a mechanism for determining the best connection between endpoints, even if they are behind different NATs (Network Address Translators) or firewalls. The process involves several steps and uses a combination of techniques, such as STUN (Session Traversal Utilities for NAT) and TURN (Traversal Using Relay NAT), to find the best connection between endpoints.

The ICE process begins with each endpoint sending its local network address and port number to a server via STUN. The server then returns the endpoint’s public IP address and port number. If one endpoint has a public IP address and port number, it can communicate directly with the other endpoint. However, if both endpoints are behind NATs or firewalls, direct communication can be difficult. In this case, the ICE protocol can help by testing different connections and selecting the best one.

A (connection) candidate can be either a Server Reflective Address (STUN address) or a Relayed Address (TURN address). A STUN address is determined by sending a STUN request to a STUN server. The STUN server then returns the public IP address and port number of the endpoint. A relayed address is determined by sending data to a TURN server. The TURN server then relays the data to the other endpoint.

After each endpoint creates a list of candidates and shares it with its peer. Using the received list of candidates, it attempts to find the best connection. The process involves several steps, including connectivity testing and prioritization. First, connectivity tests are performed between all candidates to determine which connection works best. Different types of tests are performed, such as ping tests and data transfer tests, to check the connection.

Once all tests are completed, prioritization is performed. Prioritization is based on several factors such as latency, bandwidth, and connection type. The prioritization determines which connection has the highest priority and is therefore used for data transmission.

If a direct connection between the endpoints is not possible, a relayed connection via a TURN server is used. However, using a TURN server can result in higher latency and reduced bandwidth because all data must be routed through the TURN server.

Overall, the ICE protocol provides the best connection between two WebRTC endpoints, even if they are behind different NATs or firewalls. It improves the quality of audio and video transmissions, reduces delays and distortions, and provides a seamless experience for users.

In fact, this is currently the only option for a direct connection that is currently standardized and implemented in browsers. Therefore WaveNet8//Send uses WebRTC with all implementation details for optimal direct file transfer between individual participants.

Go to technical details >>

 

© WaveNet8 2023-05-12

<< Back