Conditional Compilation sgcWebSockets

sgcWebSockets library has a configuration file located in source folder where contains all conditional compilations. This file is sgcVer.inc. If you open this file, you will see there are lots of conditional defines, basically for every Delphi / C++ Builder version, there are a bunch of conditional defines. For example, for Rad Studio 10.3 there ar...

Continue reading

WebSocket Upload File Demo

This is a demo which shows how upload a file to a websocket server. Follow the next steps: Select a file which will be sent to server.Then press connect. If connection is successful a message will show you are connected to server.Press upload button and when file has been transferred you will see a message confirming this. Upload File Demo Select f...

Continue reading

Could not load SSL library

Some libraries, like Indy, use openssl to connect to secure servers using TLS. As some components from sgcWebSockets package are based on Indy library, make use of openssl libraries and sometimes you get an error message when you can load a library. There are several reasons why you can't load the openssl library. In the following lines I will...

Continue reading

Indy IOCP Server

Indy servers use one thread for every connection, this means that if your server must handle 1000 concurrent connections, it will create 1000 threads. But if instead of 1000 connections there are 10.000 connections, it creates 10.000 threads and so on... of course, this requires exponential hardware resources and it's not usable for high load ...

Continue reading

OAuth2 Delphi WebSockets

OAuth2 allows to third-party applications to get access to restricted resources using HTTP protocol. RFC 6749 covers OAuth2 specification. There are 4 roles: ClientResource OwnerAuthorization ServerResource Server OAuth2 Flow  (A) The client requests authorization from the resource owner. The authorization request can be made directl...

Continue reading

Indy Components and OpenSSL 1.1.1

In latest years, Indy have not been updated or only fixes have been applied, and several new features have not been implemented which are very important for sgcWebSockets package. To fix this, I've been working in latest months to provide a custom indy package with more features. Registered users can download custom indy package from some versions ...

Continue reading

sgcWebSockets 4.3.4

Changes included in this version:  [+] : New Component TsgHTTP_OAuth2, this protocol allows third-party applications to grant limited access to an HTTP service, either on behalf of a resource owner or by allowing the third-party application to obtain access on its own behalf. [+] : New Property in TsgcWebSocketClient component, "Authentication...

Continue reading

SignalR Server and Client C#

sgcWebSockets supports SignalR and SignalRCore protocols, now we will see an example of how connect to a SignalR Server using a c# sample from CodeProject webpage, you can access to article using the following link: https://www.codeproject.com/Articles/5162436/Simple-SignalR-Server-and-Client-Applications-Demo#_articleTop This article shows ho...

Continue reading

FMXLinux Components

Embarcadero announced some time ago FMXLinux support, basically allows to use graphical components in Linux64 apps. sgcWebSockets supports FMXLinux so you can use these components to create a graphical interface and sgcWebSockets to connect to any server supported. You can view the following screenshot which shows how a MQTT client is working in Ub...

Continue reading

Amazon SQS Component

Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. SQS eliminates the complexity and overhead associated with managing and operating message oriented middleware, and empowers developers to focus on differentiating work. ...

Continue reading

Discord API Component

From sgcWebSockets 4.3.5 Discord API is partially supported, supports the following methods: 1. Bot Authorization 2. Automatic HeartBeat. 3. WebSocket Gateway. 4. HTTP Requests: GET, POST, PUT, PATCH and DELETE. Discord API Component Discord is one of the most popular communication tools for online gaming and streaming.. https://www.esegece.com/hel...

Continue reading

sgcWebSockets 4.3.5

Changes included in new version:  [+] : New Component TsgcHTTPAWS_SQS_Client, Amazon SQS is a fully managed message queues for microservices, distributed systems, and serverless applications. [+] : New Component TsgcWSAPI_Discord, Discord is one of the most popular communication tools for online gaming and streaming. (Thanks to Adriaan for his...

Continue reading

Binance API WebSocket and Rest API

 From sgcWebSockets 4.3.6, binance API has been improved and new methods have been implemented. Main improvements: 1. Deleted all methods to subscribe before a successful websocket connection. 2. Added support for live subscriptions in websocket api. 3. Added support for user stream websocket data. 4. Added support for Rest API. Binance APIs&n...

Continue reading

Google Cloud Pub/Sub Delphi Component

From sgcWebSockets 4.3.6, Google Cloud Pub/Sub API is supported. Pub/Sub brings the flexibility and reliability of enterprise message-oriented middleware to the cloud. At the same time, Pub/Sub is a scalable, durable event ingestion and delivery system that serves as a foundation for modern stream analytics pipelines. By providing many-to-many, asy...

Continue reading

Azure OAuth2 Authentication

The OAuth 2.0 authorization code grant can be used in apps that are installed on a device to gain access to protected resources, such as web APIs. Using the Microsoft identity platform implementation of OAuth 2.0, you can add sign in and API access to your mobile and desktop apps. sgcWebSockets supports Authorization Code Grant, so you can use our ...

Continue reading

sgcWebSockets 4.3.6

Changes included in sgcWebSockets 4.3.6 [+] : New Component TsgcHTTPGoogleCloud_PubSub_Client, Google Cloud Pub/Sub API provides messaging between applications and is designed to provide reliable, many-to-many, asynchronous messaging between applications. [+] : New Demo "Google/PubSub" which shows how connect to Google Cloud Pub/Sub API and create ...

Continue reading

Kraken API WebSocket and REST API

From sgcWebSockets 4.3.7, Kraken API component has been improved and new methods have been implemented. Main improvements: WebSockets Public API: connects to a public WebSocket server.WebSockets Private API: connects to a private WebSocket server and requires an API Key and API Secret to Authenticate against server.REST Public API: connects to...

Continue reading

TCP Half-Open Connections

Once the connection has been established, if no peer sends any data, then no packets are sent over the net. TCP is an idle protocol, so it assumes that the connection is active. Disconnection reasons Application closes: when a process is finished, usually sends a FIN packet which acknowledges the other peer that connection has been closed. But if a...

Continue reading

sgcWebSockets 4.3.7

Changes included in sgcWebSockets 4.3.7 [+] : New Component TsgcTDLib_Telegram, Allows to build Telegram Clients using TDLib JSON library. [+] : New Demo "Telegram" which shows how connect to telegram API, send a Text message, receive text messages, available chats... [+] : Improved Kraken API Component, now WebSocket API supports private channels....

Continue reading

Coturn for Windows

Coturn is a free open source implementation of TURN and STUN Servers. The TURN Server is a VoIP media traffic NAT traversal server and gateway. It can be used as a general-purpose network traffic TURN server and gateway, too. The supported project target platforms are: LinuxMac OS XWindows (Cygwin): compiled binaries are available for register...

Continue reading