Delphi WebRTC & P2P Components
Peer-to-peer communication with STUN, TURN, ICE protocols, data channels, and NAT traversal for direct client connections.
Peer-to-peer communication with STUN, TURN, ICE protocols, data channels, and NAT traversal for direct client connections.
Build peer-to-peer applications with full NAT traversal and real-time communication support.
UDP Client component for connectionless datagram communication. Ideal for low-latency real-time applications.
Learn more →UDP Server component for handling multiple datagram endpoints simultaneously.
Learn more →Session Traversal Utilities for NAT. Discover public IP addresses and port mappings behind NAT devices.
Learn more →STUN server implementation for NAT traversal assistance in peer-to-peer connections.
Learn more →Traversal Using Relays around NAT. Relay media when direct peer-to-peer connections fail.
Learn more →TURN relay server for media relay when direct P2P connections cannot be established.
Learn more →Interactive Connectivity Establishment. Automatically finds the best path between peers using STUN/TURN.
Learn more →WebRTC peer connection implementation for real-time audio, video, and data communication between browsers and applications.
Learn more →What UDP gives you over TCP, when the trade is worth making, and how the Delphi client and server components fit together.
Learn more →How STUN discovers the public address behind a NAT, which NAT types it can defeat, and where it stops being enough.
Learn more →When relaying is the only way through, how TURN allocations and permissions work, and what running your own relay costs.
Learn more →How candidate gathering and connectivity checks pick the best path between two peers, and how the ICE client drives that in Delphi.
Learn more →Discover your public IP address and port mapping behind NAT.
uses
sgcP2P, sgcP2P_STUN_Classes, sgcSocket_Classes;
procedure TForm1.DiscoverPublicIP;
begin
sgcSTUNClient1.Host := 'stun.l.google.com';
sgcSTUNClient1.Port := 19302;
sgcSTUNClient1.SendRequest;
end;
procedure TForm1.sgcSTUNClient1STUNResponseSuccess(Sender: TObject;
const aSocket: TsgcSocketConnection;
const aMessage: TsgcSTUN_Message;
const aBinding: TsgcSTUN_ResponseBinding);
begin
Memo1.Lines.Add('Public IP: ' + aBinding.RemoteIP);
Memo1.Lines.Add('Public Port: ' + IntToStr(aBinding.RemotePort));
end;
Written technical documents for every component, covering configuration, the properties and events you will use, and complete working code. Each one is also published as a PDF.