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

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

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

HTTP/2 Server Test Performance

From sgcWebSockets 4.4.3, HTTP/2 is initially supported and new features will be added on next versions. In a prior entry blog we compared the performance between HTTP 1.1 and HTTP/2 protocols, to do this, I use sgcWebSockets HTTP/2 client which downloaded 100 images from imagekit.io servers.  HTTP/2 Client  sgcWebSockets HTTP/2 clie...

Continue reading

HTTP2 Tests from HTTPBIN.ORG

httpbin.org provides a useful server to test HTTP/2 protocol, there are several cases which can be used to test HTTP clients. You can find below a list of main tests provided: HTTP Methods: Testing different HTTP verbsAuth: Auth methodsStatus Codes: Generates responses with given status codeRequest inspection: Inspect the request dat...

Continue reading

HTTP2 Latency

In a previous post, I show a comparison between HTTP2 and HTTP1 performance using a single connection (see HTTP2 vs HTTP1 performance). In this post I will show a comparative between HTTP2 and HTTP1 introducing a latency and showing how latency can affect to HTTP protocol requests. When a client do a request, there is a latency, more or less depend...

Continue reading

HTTP2 Client Tests

RFC 7540 and RFC 7541 contains the full specification of HTTP/2 protocol and in the process of implementing a new HTTP/2 client for sgcWebSockets library, is important to use external tools to check if client component is working as expected. One of this online tools is hosted in: https://http2.golang.org/ This web offers some tests for HTTP/2 clie...

Continue reading

HTTP2 vs HTTP1 Performance

sgcWebSockets supports a wide range of protocols, HTTP/2 is the protocol which is in development right now.  HTTP 1.1 has been the most used HTTP Protocol and wide implemented in server and clients during the last 15 years. But as internet grows, applications and webs growed and the amount of loaded data increased, the shor...

Continue reading

RPC Progressive Results

WAMP 1.0 is an open WebSocket subprotocol that provides two asynchronous messaging patterns: RPC and PubSub. From sgcWebSockets 4.3.8, a new method is supported, not included in WAMP 1.0 specification, but it can be very useful for our users. WAMP allows RPC calls, but server response can only be successful or not. Sometimes, an RPC requires more t...

Continue reading

UpdateMode in DataSet Protocol

sgcWebSockets Dataset Subprotocol allows to broadcast database changes to all client connected. From sgcWebSockets 4.3.8 this protocol allows 2 update modes: 1. Replicate Table: protocol updates dataset clients when a dataset has changed. 2. Notify Updates: protocol notifies clients when a dataset has changed.  Replicate Table  This mode ...

Continue reading

Indy supports ALPN (Application Layer Protocol Negotiation)

ALPN or Application Layer Protocol Name is a TLS extension that includes the protocol negotiation within the exchange of hello messages. ALPN is able to negotiate which protocol should be handled over a secure connection in a way that is more efficient and avoids additional round trips. The ever-growing in popularity HTTP/2 protocol, makes use...

Continue reading

Obsolete Connection String using RSA

sgcWebSockets library allows to run Secure WebSocket Servers using openSSL libraries, if you start a new secure server and try to connect with a web browser like chrome, will run fine and shows a green lock for the wss connection. But if you check the details of connection, you will see that chrome complains about security of it. Fix Cipher Suite&n...

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

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

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

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