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

sgcWebSockets and React client

sgcWebSockets library fully supports RFC6455, so any client that supports this RFC will be able to connect to our servers. You can connect with REACT to sgcWebSockets library without problems, just create a new class which implements WebSocket class and use it to connect, send messages, receive messages from server... React WebSocket Example  ...

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

OAuth2 Server Allow none authenticated requests

By default, when OAuth2 is enabled on Server Side, all the HTTP Requests require Authentication using Bearer Tokens. If you want allow some URLs to be accessed without the need of use a Bearer Token, you can use the event OnOAuth2BeforeRequest Find below a sample code which shows the use of the event. procedure OnOAuth2BeforeRequest(Sender: TObject...

Continue reading

OAuth2 Server Register Apps

Before a new OAuth2 is requested by a client, the App must be registered in the server. Register a new App requires the following information:   App Name: is the name of the Application. Example: MyApp  RedirectURI: is where the responses will be redirected. Example: http://127.0.0.1:8080  ClientId: is public information and is the I...

Continue reading

OAuth2 Server Endpoints

By default, the OAuth2 Server uses the following Endpoints:   Authorization: /sgc/oauth2/auth   Token: /sgc/oauth2/token Which means that if your server listens on IP 80.54.41.30 and port 8443, the full OAuth2 Endpoints will be:   Authorization: https://80.54.41.30:8443/sgc/oauth2/auth   Token: https://80.54.41.30:8443/sgc/oauth...

Continue reading

OAuth2 Server Authorization

From sgcWebSockets 4.4.5 OAuth2 protocol is supported on Server Components. OAuth2 allows third-party applications to receive a limited access to an HTTP service which is either on behalf of a resource owner or by allowing a third-party application obtain access on its own behalf. Thanks to OAuth2, service providers and consumer applications can in...

Continue reading

Worldpay WebSocket STOMP API

Worldpay offers direct integration using WebSockets + STOMP protocols. You can access to Worldpay API using sgcWebSockets library, just need a TsgcWebSocketClient and STOMP Protocol client in order to connect to this API Find below a sample code to connect to Worldpay using sgcWebSockets library Delphi Example  // create websocket clientoClien...

Continue reading

sgcWebSockets 4.4.4

These are the features included in sgcWebSockets 4.4.4 [+] : New Component TsgcHTTPGoogleCloud_Calendar_Client, allows to use Google Calendar API V3: get Calendars, events, synchronize with your own calendar... [+] : New Demo GoogleCalendar which shows the main features of Google Calendar Client. [+] : New method "PublishAndWait" in MQTT Client, th...

Continue reading

WatchDog Monitor Server

From sgcWebSockets 4.4.4 a new property Monitor has been added to WatchDog feature, WatchDog.Monitor allows to verify if new clients can connect to server, this is done by an internal client that tries to open a WebSocket connection to server, if fails, it restart the server.  To monitor if clients can connect to server with a Time Out of 10 s...

Continue reading

Telegram Client and Proxies

From sgcWebSockets 4.4.4, the Telegram Client supports Proxy connections. Telegram Client can be configured to make of use of a proxy. Currently, Telegram supports 3 types of proxies: 1. HTTP 2. MTProto 3. Socks5 Add Proxy  In order to configure a HTTP Proxy, first you must add the proxy to telegram configuration, to do this, just call Ad...

Continue reading

MQTT Publish Message and Wait Response

From sgcWebSockets 4.4.4 the MQTT client has a new method called PublishAndWait. Till now, when a client publishes a message using QoS levels 1 or 2, the only way to know if the message was processed by server was using the asynchronous events OnMQTTAcknowledgment or OnMQTTPubComp, this means that client must implement his own wait method to check ...

Continue reading

Google Calendar Client API V3

From sgcWebSockets 4.4.4, Google Calendar API is supported, the Google Calendar API lets you integrate your app with Google Calendar, creating new ways for you to engage your users. The Calendar API lets you display, create and modify calendar events as well as work with many other calendar-related objects, such as calendars or access controls. Mai...

Continue reading

sgcWebSockets 4.4.3

These are the features included in sgcWebSockets 4.4.3 [+] : Initial support for HTTP/2 in TsgcWebSocketHTTPServer - New property HTTP2Options: allows to enable HTTP/2 protocol and configure initial settings. [+] : Improved Bittrex API component, now supports latest V3 API. - New Methods: Subscriptions to Balance, Orders, Candles, Trades... - New E...

Continue reading

DataSnap with WebSocket and HTTP/2

From sgcWebSockets 4.4.3, you can replace your DataSnap server application by our WebSockets server and take advantage of new features like: WebSocket ProtocolHTTP/2 ProtocolIOCP There are 3 different types of server that you can use as a replacement of TIdHTTPWebBrokerBridge default Indy server.  Server Main Features Description TsgcWSHTTPWeb...

Continue reading