SChannel Certificates

From sgcWebSockets 4.4.7 the use of Certificates using SChannel as crypto library is supported. The SChannel implementation supports 2 types of certificate authentication: 1. Using a PFX certificate 2. Setting the Hash Thumbprint of an already installed certificate in the windows system. PFX Certificate  PFX Certificate is a file that con...

Continue reading

Socket.IO 3 API support

From sgcWebSockets 4.4.7, Socket.IO 3 API is supported.  Now by default, when you create an instance of Socket.IO Client, it's configured against API 3.* Sample  Find below a simple sample of how connect to Socket.IO API 3 server // create websocket clientoClient := TsgcWebSocketClient.Create(nil);oClient.Host := 'socketio-chat-h9jt.herok...

Continue reading

Binance Futures APIs USDT and COIN

From sgcWebSockets 4.4.7, both Binance Futures APIs are supported: USDT and COIN. USD Futures: https://binance-docs.github.io/apidocs/futures/en COIN Futures: https://binance-docs.github.io/apidocs/delivery/en Configuration  Client can connect to USDT or COIN Binance Futures, set which contract you want to trade using FuturesCon...

Continue reading

Coinbase WebSocket API

From sgcWebSockets 4.4.7, Coinbase WebSocket API is supported. Coinbase is a platform that allows to sell, buy and store cryptocurrencies like Ethereum, Bitcoin... WebSocket API allow to receive in real-time ticker updates, status, tickers, book deepth and more. How Connect to Coinbase oClient := TsgcWebSocketClient.Create(nil);oCoinbase := TsgcWSA...

Continue reading

Telegram Bot Chat not found

When you log as bot, the GetChats method cannot be used, so you don't get All available chats. If it's the first time you login as Bot and you try to send a message to a known Chat, you will get this error: {"@type":"error","code":5,"message":"Chat not found"} The solution is before send a telegram message, call GetChat method and pass the ChatId a...

Continue reading

Telegram Send Message Bold, Italic...

Telegram client has been improved with a new method, SendRichTextMessages, which supports the use of styles like: bold, italic, underline, strike and code. The use is very simple, if you want send a text in bold, just use the following notation: This is a **bold** text. Markdown Syntax  Bold [ * ] **This is bold message** Italic [ _ ] __T...

Continue reading

AWS Cognito and OAuth2

sgcWebSockets library supports OAuth2 Authentication in Server and Client components, next version will include a new feature required by AWS Cognito service, when you try to authenticate using OAuth2 with Cognito, the service requires that the Server listens on a Secure port, so now OAuth2 Client component can use SSL/TLS encryption layer. The Loc...

Continue reading

HTTP/2 Alternate Service

The Alt-Svc HTTP header is used to inform the clients that the same resource can be reached from another service or protocol, this is useful if you want inform the HTTP clients that your server supports HTTP/2 for example. Example: if your server is running on a local IP 127.0.0.1 and is listening on 2 ports: 80 (non encrypted) and 443 (encrypted)....

Continue reading

WebSocket Client Before Connect and Before WatchDog

WebSocket Client can be customized with some of the events available. There are 2 new events added to the latest version: OnBeforeConnect: this event is called just before the client tries to connect to server OnBeforeWatchDog: sgcWebSocket client has a built-in method to reconnect after a disconnection called WatchDog, this event is called before ...

Continue reading

sgcWebSockets 4.4.6

Here is the comprehensive list of new features and bug fixes included in sgcWebSockets 4.4.6: [+] : New Event OnBeforeForwardHTTP on Server Components, allows to forward an HTTP request to another server. (Thanks to Olaf for his suggestion). [+] : New Event OnAfterForwardHTTP on Server Components, allows to know the response from HTTP Forwarded Req...

Continue reading

Facial Recognition

From sgcBiometrics 2.0, Facial Recognition is supported using a compatible Windows Hello camera, this allows to monitor if there is a human person in front of the camera (you can know if there is someone, identify, arrives, departs and more). Facial Recognition and Identification is supported too. Facial Recognition is only supported by system...

Continue reading

Forward HTTP Requests

From  sgcWebSockets 4.4.6, forward HTTP requests is supported. Reverse proxy is useful when there is a single server listening on a public port and behind it there are other servers that cannot be accessed from a public address.  Example: you can serve all HTTP requests using our sgcWebSockets server and forward to another serve...

Continue reading

Telegram Send Message with Buttons

From sgcWebSockets 4.4.6, the telegram client has been improved to support send messages with buttons (only supported when you login as a bot). The methods to send a message have been modified to add a new parameter where you can send the Callback and URL Buttons. Before you send a message create an instance of the class TsgcTelegramReplyMarkupInli...

Continue reading

Service Accounts Google Cloud PubSub

From sgcWebSockets 4.4.6, the Google Cloud PubSub client components adds a new authentication protocol. Till now, only OAuth2 protocol was supported, now Authenticate using JWT is supported too. This means that you can run a service or an automated application with the need to authenticate using a Web-Browser like with OAuth2. There is a new proper...

Continue reading

FastMM4 vs FastMM5 vs FastMM4-AVX

Recently a new version of FastMM, developed by Pierre le Riche, has been released, the new version is called FastMM5 and has been rewritten to improve the performance on multi threaded applications, can be configured for better speed or less memory usage and more. Support from Delphi XE3 Compiler and can used on Windows32 and Windows64. FastMM...

Continue reading

HTTP/2 Server Push

A new feature has been added to Indy Servers, now Server Push is supported by sgcWebSockets library. HTTP usually works with Request/Response pattern, where client REQUEST a resource to SERVER and SERVER sends a RESPONSE with the resource requested or an error. Usually the client, like a browser, makes a bunch of requests for those assets...

Continue reading

File not found bplrtl270.dylib

Compiling sgcWebSockets in Rad Studio 10.4.1, some users reported problems compiling under OSX64, they get this error: Directory not found for option 'Lc:\Program Files (x86)\embarcadero\studio\21.0\redist\OSX64 file not found bplrtl270.dylib Fix bplrtl270.dylib error Seems latest Rad Studio version breaks something, and some required files are mis...

Continue reading

HTTP/2 Conformance Tests

sgcWebSockets supports HTTP/2 protocol on Server and Client components, implementation is made in 100% pure Delphi code without using any external library. We have tested our HTTP/2 implementation using h2spec which is a great tool for testing HTTP/2 protocol https://github.com/summerwind/h2spec The sgcWebSockets HTTP/2 Server and Client compo...

Continue reading

sgcWebSockets 4.4.5

Here is the comprehensive list of new features and bug fixes included in sgcWebSockets 4.4.5: [+] : New Component TsgcHTTP_OAuth2_Server, server implementation of OAuth2 protocol, allows to Authorize and Issue Access Tokens to OAuth2 clients. [+] : New Demo which shows how enable OAuth2 on Server Components (is located in folder Demos\20.HTTP_Proto...

Continue reading

OAuth2 Customize Sign-In HTML

When an OAuth2 client do a request to get a new Access Token, a Web-Page is shown in a web-browser to Allow this connection and login with an User and Password. The HTML page is included by default in Server component, but this code can be customized using OnAuth2BeforeDispatchPage event. procedure OnOAuth2BeforeDispatchPage(Sender: TObject; OAuth2...

Continue reading