Establishing a direct connection between two devices typically requires a dedicated central server. Peer connection bypasses the server requirement by helping to connect two devices, making each device serve as a client and a server.
Peer Connection is a WebRTC specification that uses peer-to-peer protocol to encode and decode media, transport information, and ensure effective communication between two participants of different networks. It helps establish a connection between two participants and ends it when no longer needed. In peer connection, the devices can exchange information (audio, video, data in different formats) about each other's network. The information sharing helps to establish effective communication between the devices.
Establishing a peer connection begins with signaling. Here, the devices of different networks need to share information about network addresses. One of the devices creates an offer and informs the other about its capabilities. Before the communication can occur, connectivity information about the other device must also be shared. An external service called ICE is used to identify candidates to communicate. The ICE uses a STUN or TURN server. More information about peer connection can be found on the WebRTC website.
Peer connection uses external signaling (ICE) to identify the devices on different networks.
WebRTC facilitates real-time communication between peers, enhancing the overall communication quality and speed.
Yes, Peer Connections can bridge the gap between devices on different networks, enabling seamless communication.