RTCPeerConnection
Talk WebRTC from Delphi/C++Builder — ICE for connectivity, DTLS 1.3 for the keying handshake, SRTP for media, SCTP-over-DTLS for DataChannels. No browser required.
Talk WebRTC from Delphi/C++Builder — ICE for connectivity, DTLS 1.3 for the keying handshake, SRTP for media, SCTP-over-DTLS for DataChannels. No browser required.
Native Delphi WebRTC peer — mirrors the W3C RTCPeerConnection surface (CreateOffer / CreateAnswer / SetRemoteDescription / AddIceCandidate / DataChannel) backed by the bundled ICE, DTLS 1.3, SRTP and SCTP stacks.
TsgcRTCPeerConnection
Windows, macOS, Linux, iOS, Android
Enterprise
Add ICE servers, CreateOffer, send the SDP to the remote peer over your signalling channel, set the answer, and the data path lights up.
uses
sgcP2P;
var
Peer: TsgcRTCPeerConnection;
Channel: TsgcRTCDataChannel;
begin
Peer := TsgcRTCPeerConnection.Create(nil);
Peer.IceServers.Add('stun:stun.l.google.com:19302');
Peer.OnLocalDescription := procedure(Sender: TObject;
const aSDP: string)
begin
SignalToPeer(aSDP); // over your WebSocket / WebRTC signalling
end;
Peer.OnDataChannel := procedure(Sender: TObject;
aChannel: TsgcRTCDataChannel)
begin
Channel := aChannel;
aChannel.OnMessage := procedure(Sender: TObject;
const aText: string)
begin
Memo1.Lines.Add(aText);
end;
end;
// outbound side
Channel := Peer.CreateDataChannel('chat');
Peer.CreateOffer;
end;
// uses: sgcP2P
TsgcRTCPeerConnection *Peer = new TsgcRTCPeerConnection(this);
Peer->IceServers->Add("stun:stun.l.google.com:19302");
TsgcRTCDataChannel *Channel = Peer->CreateDataChannel("chat");
Peer->CreateOffer();
A native WebRTC peer that bundles ICE, DTLS 1.3, SRTP and SCTP into a single component — mirroring the W3C RTCPeerConnection API.
CreateOffer and CreateAnswer generate RFC 8866 SDP with the right ICE-UFRAG / ICE-PWD / FINGERPRINT / SETUP attributes; SetRemoteDescription ingests the peer's SDP.
Uses TsgcICEClient internally for candidate gathering and connectivity checks; AddIceCandidate feeds remote candidates as they trickle in from signalling.
After the selected ICE pair becomes writable, the component performs a DTLS 1.3 handshake (RFC 9147) and derives SRTP keys via SRTP-extractor.
CreateDataChannel opens an SCTP stream multiplexed over DTLS — reliable / partial-reliable, ordered / unordered, with backpressure via BufferedAmount.
Audio / video tracks travel over SRTP. The companion TsgcWSPServer_RTCPeerConnection server-side signalling component lets you build SFU-style relays.
Interops with browser RTCPeerConnection — tested against Chromium / Firefox / Safari. Same SDP semantics, same ICE candidates, same DataChannel wire format.
Authoritative sources for the protocol this component implements.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — TsgcRTCPeerConnection Full property, method and event reference for this component. | Open | |
| Demo Project — Demos\35.P2P\05.RTCPeerConnection Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |