Web is basically operational using HTTP requests and responses. In this mechanism, the client always initiates the connection. There is a timeout period after which the server discards the connection. Once discarded, the client must initiate a new connection. This is OK with normal web applications but for real time communication this is not enough. A system called HTTP long polling was developed to try and overcome this problem. With this implementation, the server keeps the connection open until new data arrives. This is used in GMail chat. But in this case, server resources are blocked through the connection.
What are WebSockets?
Websockets solve the above problem by allowing the server and client to send messages at any time. With Websockets the communication begins a HTTP request and then upgrades to connection to Websockets using the TCP protocol connection for communication.
What is WebRTC?
Unlike Websockets, WebRTC doesn’t relay data through a server. It sends data between browsers or devices. It supports sending and receiving video, audio and generic data. It’s a real-time communication method. It’s a part of the HTML5 specification which is supported by most modern web-browsers.
How do I find easy to use WebRTC components for Delphi?
ESEGECE offers an easy to use component set for Websockets and all of its other protocols including WebRTC.
You can get these components from this link: https://www.esegece.com/websockets/download
How do I setup a WebRTC server using SGC components?
You can easily setup a WebRTC server using these components.
Step 1: Add a new “
TsgcWebSocketServer” component and open bindings. Add new binding and set the server IP and the port (For Eg: IP: 127.0.0.1 / Port: 80).
Step 2: Add a new “
TsgcWSPServer_WebRTC” and set the server as the “
TsgcWebSocketServer” component we added earlier.
Step 3: Activate the “TsgcWebSocketServer” server component and you have a WebRTC server.
Now you can open your web-browser, then open the server IP, and there you should find your WebRTC client.
Where can I find Delphi Websockets demos?
The ESEGECE Delphi WebSockets Components come with many demo applications for different protocols including the WebRTC. Inside the demo folder you can find the “WebRTC_Protocol” the which is a WebRTC implemented video chat demo application.
Also you can access their web demos from this link: https://www.esegece.com:2053/webrtc
The fun isn’t all reserved for Delphi developers – ESEGECE Websocket components are also available for RAD Studio C++ Builder.
Why not download a copy of RAD Studio and try the websocket demos for yourself?