With sgcWebSockets 4.1.7 we introduce 2 new APIs 

  • SignalR: is a library for ASP.NET developers that makes developing real-time web functionality using websockets as transport.
  • Bittrex: is a US-based cryptocurrency exchange.

 

Full List of Changes:

 [+] : New Client Component TsgcWSAPI_SignalR

 [+] : New Client Component TsgcWSAPI_Bittrex.

 [+] : New Property "CloseReason" in TsgcWSConnection, is reason why connection has been closed by other peer.

 [+] : Poloniex Demo improved, added api2.poloniex.com server.

 

 [*] : Fixed Bug when disconnect has a Close Reason, error code wasn't readed properly.

 [*] : Fixed Bugs compiling Delphi7 with latest Indy version.

 [*] : Fixed Bug in sgcWebSocket_HTTPAPI, ULONGLONG was redeclared.

 [*] : Fixed Bug in design package dclsgcWebSocketsD*.* only win32 personality is needed.

 [*] : Fixed Bug Dataset Protocol if UpdateMode = upWhereChanged, only key fields were updated.

 [*] : Fixed Bug Deleting TsgcPing elements from server/client components.

 [*] : Fixed Bug compiling for Delphi2006 with latest Indy version.

 [*] : Fixed WebRTC warnings.

 

With sgcWebSockets 4.1.6 we introduce new STOMP Protocol. STOMP provides an interoperable wire format so that STOMP clients can communicate with any STOMP message broker to provide easy and widespread messaging interoperability among many languages, platforms and brokers. There are 3 new protocol clients:

1. Generic STOMP Protocol client: allows to connect to virtually any STOMP Server.

2. RabbitMQ STOMP client: client for RabbitMQ Broker, using STOMP.

3. ActiveMQ STOMP client: client for ActiveMQ Broker, using STOMP.

 

WebSocket STOMP Protocol

Download WebSocket Client DEMO 

 

SGC WebSocket Protocol now supports wildcards in subscribe and publish methods,  Subscription Wildcards

 

Full List of changes:

 

 [+] : New Component TsgcWSPClient_STOMP, generic STOMP Protocol client, allows to connect to any STOMP Server

 [+] : New Component TsgcWSPClient_STOMP_RabbitMQ, STOMP client for RabbitMQ Broker.

 [+] : New Component TsgcWSPClient_STOMP_ActiveMQ, STOMP client for ActiveMQ Broker.

 [+] : New Demo "Client" which shows how connect to: WebSocket Server, MQTT Server and STOMP Server.

 [+] : SGC Protocol Server, Publish method now is overloaded, new method now accepts QueueLevel (store last message or store all messages).

 [+] : SGC Protocol Server, Subscribe/UnSubscribe methods now supports wildcard characters, so you can subscribe to a hierarchy of channels. Example: if you want subscribe to all channels which start with 'news', then call Subscribe('news*').

 [+] : SGC Protocol Server, Publish method now supports wildcard characters, so you can publish to a hierarchy of channels. Example: if you want send a message to all subscribers to channels which start with 'news', then call Publish('news*').

 

 [*] : Fixed Bug Broker component processing messages when more than one protocol is attached.

 [*] : Fixed Bug BCBuilder compiling error in sgcWebSocket_WinAPI.

 [*] : Fixed Bug MQTT Client reading remaining length.

 [*] : Fixed Bug MQTT Client Heartbeat doesn't start after a disconnection.

 [*] : Fixed Bug Client when disconnecting from a thread.

 [*] : Fixed Bug TsgcPing in client component was not destroyed properly.

 [*] : Fixed Bug SGC Protocol method UnSubscribeAll was not destroying all subscriptions.

 [*] : Fixed Bug SGC Protocol if a message was published with queueLevel1, message was not retained in server.

 

 [/] : Property rename in TsgcWebSocketServer, Connections[Guid] now is ConnectionsByGuid[Guid]

With sgcWebSockets 4.1.5 we introduce APIs. There are several implementations based on WebSockets: finance, message publishing, queues... sgcWebSockets implements the most important APIs based on WebSocket protocol. In order to use an API, just attach API component to client and all messages will be handled by API component (only one API component can be attached to a client).

 List of New APIs:

1. Blockchain: Blockchain WebSocket API allows developers to receive Real-Time notifications about new transactions and blocks.

2. Bitfinex: Bitfinex is one of the world's largest and most advanced cryptocurrency trading platform. Users can exchange Bitcoin, Ethereum, Ripple, EOS, Bitcoin Cash, Iota, NEO, Litecoin, Ethereum Classic...

3. Pusher: Pusher is an easy and realiable platform with flexible pub/sub messaging, live user lists, authentication...

APIs can be registered at runtime, just call Method RegisterAPI and pass API component as parameter.

 

Full List of changes:

 [+] : New Component TsgcWSAPI_Bitfinex, Bitfinex is one of the world's largest and most advanced cryptocurrency trading platform. Users can exchange Bitcoin, Ethereum, Ripple, EOS, Bitcoin Cash, Iota, NEO, Litecoin, Ethereum Classic...

 [+] : New Component TsgcWSAPI_Blockchain, Blockchain WebSocket API allows developers to receive Real-Time notifications about new transactions and blocks.

 [+] : New Component TsgcWSAPI_Pusher, Pusher is an easy and realiable platform with flexible pub/sub messaging, live user lists, authentication...

 [+] : New property "URL" in client components, read url and automatically set host, port, tls, parameters...

 [+] : New property "Parameters" in TsgcIWWebSocketClient, allows to set a parameter in url.

 

 [*] : Fixed Bug in Internet Explorer 8 using Flash as Fallback, error: "this.transport.indexOf" not supported.

 [*] : Fixed Bug WriteData as Text when RFC6455 Specification is False.

 [*] : Fixed Bug in ProtocolRegistered function when more than one protocol is supported by a single protocol.

 [*] : Fixed Bug "Constant expression violates subrange bounds" in sgcWebSocket_HTTPAPI_Server unit compiling for 64bits.

 [*] : Fixed Bug in sgcWebSockets.dll, error event was not raised if there was any error before a succesful connection.

 [*] : Fixed Bug ClientTest demo trying to connect to echo.websocket.org TLS

 [*] : Fixed Bug using sgcWebSocketLib.pas with Delphi 7.

 [*] : Fixed Bug RegisterProtocol with Broker component.

 [*] : Fixed Bug in TsgcWebSocketClient when WatchDog enabled and notifyEvents = neNoSync.

New method lo register SubProtocol in an easy way, implementing new features for Server based on Microsofot HTTP API 2.0 for windows and IOCP and some bugs and fixes.

 

 [+] : Overloaded method to register subprotocols at runtime by name. Events are raised on Server/Client context in this case.

 [+] : Added New Methods in sgcWebSockets library to send binary messages using TBytes as parameter.

 [+] : Added support for Socket.IO API 2.*

 [+] : Updated Socket.IO to latest online demo.

 [+] : Added RegisteredURLs to TsgcWebSocketServer_HTTPAPI, allows to register which URLs will be handled by sgcWebSockets.

 

 [*] : Fixed Warnings compiling sgcWebSockets library with latest compiler.

 [*] : Fixed Bug compiling CBuilder with method SetPort.

 [*] : Fixed several bugs for TsgcWebSocketServer_HTTPAPI

There is a new client protocol for WAMP 2.0, now you can connect to WAMP 2.0 servers like Poloniex.

WAMP is an open standard WebSocket subprotocol that provides two application messaging patterns in one unified protocol: Remote Procedure Calls + Publish & Subscribe.

 

Full List of changes:

 [+] : New Protocol Component TsgcWSPClient_WAMP2, implements WAMP 2.0 protocol.

 [+] : Added support for Server Proxy Sub-Protocols.

 

 [*] : When connection is IPv6, built-in sgcWebSockets.html was not showed properly.

 [*] : Fixed Bug in TsgcWebSocketServerHTTP on Linux64, files inside DocumentRoot where not found.

 [*] : Fixed Bug in Delphi7, error compiling MQTT Client.

 [*] : Fixed Bug MQTT client, heartbeat only work if client enables it.

 [*] : Fixed Bug MQTT client, ClientIdentifier was ignored if CleanSession was true.

 [*] : Small fixes to allow Delphi7 compile latest Indy version.

 [*] : Fixed Bug MQTT client, dirty messages when subscribing with mtqsAtLeastOnce.

 [*] : Fixed Library Free version.

 [*] : Fixed Bug Dataset Protocol, LargeInteger was not properly decoded when Base64 was enabled.

 [*] : Fixed Bug if handshake message was fragmented, connection was closed.

 

Welcome to Linux compiler!

With 4.1.0 version, linux compiler is supported so you can build your projects in linux, simple example:

program sgcWebSockets_linux;

 {$APPTYPE CONSOLE}

{$R *.res}

uses

  System.SysUtils, sgcWebSocket;

var

  oServer: TsgcWebSocketServer;

begin

  try

    oServer := TsgcWebSocketServer.Create(nil);

    oServer.Port := 5000;

    oServer.Active := True;

    while oServer.Active do

      Sleep(10);

  except

    on E: Exception do

      Writeln(E.ClassName, ': ', E.Message);

  end;

 

end.

 

Of course, Rad Studio 10.2 is full supported, so you can upgrade your projects to latest version.

MQTT client has been improved with new methods and there is a new demo showing main features.

Full list of changes:

 

 [+] : Added support for Rad Studio 10.2 Tokyo.

 [+] : Added support for Linux compiler.

 [+] : MQTT client, added subscribe method.

 [+] : MQTT client, added unsubscribe method.

 [+] : MQTT client, added publish method.

 [+] : MQTT client, added Authentication property, allows to set user and password to authenticate against MQTT Server.

 [+] : MQTT client, added HeartBeat property, keeps alive connection.

 [+] : MQTT client, added LastWillTestament property, when client disconnects, sends a message to other connected clients.

 [+] : New Property "NotifyDeletes" in Dataset Server Protocol, if enabled (by default) broadcast deleted record to all clients.

 [+] : New Method "BroadcastRecord" in Dataset Server Protocol, sends dataset record values to all clients.

 [+] : New Method "MetaData" in Dataset Server Protocol, sends metadata info to a single client.

 [+] : New Method "Synchronize" in Dataset Server Protocol, sends dataset record values to a single client.

 

 [*] : Fixed Bug ReadTimeout and ConnectionTimeout in client component.

 [*] : Added Guid property to Client File Protocol.

 [*] : Fixed Bug Invalid Character when trying to access to built-in javascript libraries.

 [*] : Fixed Bug File Protocol when BufferSize was set to zero, file was not saved properly.

 [*] : Fixed Memory Leaks on NextGen compiler.

 [*] : Fixed WebRTC Chrome console errors.

 

 

sgcWebSockets 4.0.2 introduces a new client for MQTT protocol. It's designed for lightweight publish/subscribe messaging transport and is usually used in IoT (Internet of Things).

Full List

 [+] : New Component TsgcWSPClient_MQTT, implements MQTT protocol, it's still beta and next versions will support more methods.

 [+] : MQTT client, added connect method.

 [+] : MQTT client, added connack method.

 [+] : MQTT client, added pingreq method.

 [+] : MQTT client, added pingresp method.

 [+] : MQTT client, added disconnect method.

 

 [*] : Fixed Bug Javascript SGC Protocol, when calling rpc method with non numeric parameters.

 [*] : Fixed Access Violation on client components when hard socket disconnect.

 [*] : Fixed Bug Dataset Protocol, synchronization didn't search if record exists.

 [*] : Fixed Bug when client disconnects, sometimes OnDisconnect event was not raised.

 [*] : Fixed Bug Dataset Protocol, parsing error in float fields.

 

In this version, the main changes affect to WinHTTP client, which now supports:

  1. Asynchronous requests: use the WinHTTP functions asynchronously. By default, all WinHTTP functions that use the returned HINTERNET handle are performed synchronously.
  2. Proxy support: now connections can use http proxies.

 

Full List

  [+] : WinHTTP client, added proxy support.

 [+] : WinHTTP client, added asynchronous request support.

 [+] : WinHTTP client, implemented query close status.

 

 [*] : Fixed Bug using OnBinary event in C#, added a new event to handle binary data using array of bytes.

 [*] : Fixed messages when compiling: unit '%s' implicitly imported into package '%s'

 [*] : Fixed Memory Leaks websocket server.

 [*] : Fixed Memory Leak TsgcWSClient.

 [*] : Fixed Bug, disconnect event was not raised in iOS / Android.

 [*] : Fixed Bug in WriteData method from protocol components.

 [*] : Fixed Bug, added QueueOptions to published properties of client.

 [*] : Fixed Bug, Access violation when Server.Active := False and SSL enabled.

 [*] : Fixed Bug, Access violation when Client.Active := False and SSL enabled.

 [*] : Fixed Bug, when RaiseDisconnectExceptions is not enabled, some exceptions were not catched.