Delphi WebRTC & P2P Components

Peer-to-peer communication with STUN, TURN, ICE protocols, data channels, and NAT traversal for direct client connections.

Enterprise Edition Only

P2P & WebRTC Components

Build peer-to-peer applications with full NAT traversal and real-time communication support.

UDP Client

UDP Client component for connectionless datagram communication. Ideal for low-latency real-time applications.

Learn more →

UDP Server

UDP Server component for handling multiple datagram endpoints simultaneously.

Learn more →

STUN Client

Session Traversal Utilities for NAT. Discover public IP addresses and port mappings behind NAT devices.

Learn more →

STUN Server

STUN server implementation for NAT traversal assistance in peer-to-peer connections.

Learn more →

TURN Client

Traversal Using Relays around NAT. Relay media when direct peer-to-peer connections fail.

Learn more →

TURN Server

TURN relay server for media relay when direct P2P connections cannot be established.

Learn more →

ICE Client

Interactive Connectivity Establishment. Automatically finds the best path between peers using STUN/TURN.

Learn more →

RTCPeerConnection

WebRTC peer connection implementation for real-time audio, video, and data communication between browsers and applications.

Learn more →

UDP Explained

What UDP gives you over TCP, when the trade is worth making, and how the Delphi client and server components fit together.

Learn more →

STUN Explained

How STUN discovers the public address behind a NAT, which NAT types it can defeat, and where it stops being enough.

Learn more →

TURN Explained

When relaying is the only way through, how TURN allocations and permissions work, and what running your own relay costs.

Learn more →

ICE Explained

How candidate gathering and connectivity checks pick the best path between two peers, and how the ICE client drives that in Delphi.

Learn more →

Delphi STUN Client Example

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;

P2P Component Reference

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.

Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Start Building P2P Applications

Download the free trial and explore peer-to-peer communication components.