With sgcWebSockets 4.2.2 ASP.NET SignalRCore API is supported.

ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly.

Good candidates for SignalR:

  • Apps that require high frequency updates from the server. Examples are gaming, social networks, voting, auction, maps, and GPS apps.
  • Dashboards and monitoring apps. Examples include company dashboards, instant sales updates, or travel alerts.
  • Collaborative apps. Whiteboard apps and team meeting software are examples of collaborative apps.
  • Apps that require notifications. Social networks, email, chat, games, travel alerts, and many other apps use notifications.

Changes included

 [+] : Added support for SignalRCore, new client component TsgcWSAPI_SignalRCore, is an open-source library that simplifies adding real-time web functionality to apps.

 [+] : Updated Client demo for SignalRCore.

 [+] : Updated HTTPAPI Server demo.

 [+] : Improved Help manual, shows how install sgcWebSockets package step by step and most common errors.

 

 [*] : Fixed Bug TsgcWebSocketServer if Basic Authorization was enabled, connection thread never ends and increase cpu load.

 

 [*] : Fixed Bug TsgcWebSocketServer when custom headers are sent on handshake, in some cases may close connection.

 

With sgcWebSockets 4.2.1 several optimizations are included in this version, mostly for server components. Some methods have been modified or improved to increase server performance when there are several concurrent connections.

Changes included

 [+] : Subscribe/Unsubscribe methods from Protocol Components, now accepts multiple channels. Just send channels separated by commas, to subscribe/unsubscribe from multiple channels.

 

 [*] : Improved speed calling method WriteQueueData.

 [*] : Improved speed calling to save session id when using authentication.

 [*] : Improved speed saving MethodId in SGC Server Protocol.

 [*] : Improved speed writing data in SGC Server Protocol.

 [*] : Improved speed writing data in Files Server Protocol.

 [*] : Improved speed writing data in Dataset Server Protocol.

 [*] : Improved speed server detecting authentication type.

 [*] : Improved speed decoding websocket headers.

 [*] : Improved speed subscribe/unsubscribe to channels.

 [*] : Improved speed extension permessage-deflate.

 [*] : Fixed Bug TsgcWebSocketServer using plain TCP connections, OnBinary event was not called.

 [*] : Fixed Bug using plain TCP connections, OnConnect event was not called.

 [*] : Fixed Bug when notifyEvents = neAsynchronous, in some circumstances, index out of list processing asynchronous events.

 [*] : Fixed Bug LoadBalancer Client can't connect to LoadBalancer server if TLS is enabled.

 [*] : Fixed Bug SGC Protocol, when no channel is passed in publish method, exclude/include parameters may fail.

 [*] : Fixed Bug TsgcWebSocketServer when heartbeat is enabled, if new connection is created after last broadcasted ping and before heartbeat timeout, connection was closed by error.

 [*] : Fixed Bug MQTT Range Check Error.

 [*] : Fixed Bug Broker Component, if OnError event is fired with "connection has been gracefully closed", OnDisconnect event is not called and watchdog doesn't works properly.

 [*] : Fixed Bug Server Authentication, Authenticated variable was not initialized before OnAuthentication event.

 [*] : Fixed Bug TsgcWSConnection.Close method, doesn't works properly.

 [*] : Fixed Bug Validating UTF8 strings.

 [*] : Fixed Bug reading extension permessage-deflate.

 [*] : Fixed Bug websocket client, dead-lock accessing internal read thread.

 

 [/] : TsgcThreadList class moved to sgcWebSocket_Classes_SyncObjs

 [/] : TsgcCriticalSection class moved to sgcWebSocket_Classes_SyncObjs

 

 

With sgcWebSockets 4.2.0 we add support for Rad Studio 10.3 Rio and introduce a new websocket protocol.

 

 Full List of Changes:

 

 [+] : Added support for Rad Studio 10.3 Rio.

 [+] : New Protocol Presence (Server and Client), allows to know who is subscribed to a channel, example: chat rooms, collaborators on a document, people viewing the same web page, competitors in a game...

 [+] : New Client Component TsgcWSAPI_Bitmex, is a cryptocurrency exchange and derivative trading platform.

 [+] : New Server Event, OnUnknownProtocol, if protocol is not detected, here you can set which protocol use (example: allows to set plain TCP protocol).

 [+] : New Presence Demo which shows how Presence protocol works.

 [+] : New AppRTCEmbed demo, uses CEF4Delphi library to embed Chromium-based browsers in a client application to use AppRTC online demo without any webbrowser installed. More infor about CEF4Delphi: https://github.com/salvadordf/CEF4Delphi

 

With sgcWebSockets 4.1.11 we improve Microsoft HTTP API Server and improve performance and stability

 

 Full List of Changes:

 

[+] : MQTT Protocol now support publishing binary data.

[+] : New demo called "Mobile" replace "iOS" demo and shows how connect to a secure WebSocket server in Android 7.0+.

[+] : New Property in HTTP API Server, Timeouts, allows to override default timeouts of HTTP API Server.

[+] : New Property in HTTP API Server, ThreadPoolSize, by default 32 (maximum allowed is 64), allows to set number of threads of HTTP API Server.

[+] : New Property in HTTP API Server, MaxBandwidth, maximum allowed bandwidth rate in bytes per second (zero means unlimited, value by default).

[+] : New Property in HTTP API Server, MaxConnections, maximum number of connections (zero means unlimited, value by default).

 

[*] : Fixed Bug AppRTC Protocol, when close call and try to rejoin shows an error.

[*] : Fixed Memory Leak in MQTT Protocol component when destroying object.

[*] : Fixed Bug MQTT Protocol, Packet Identifier was not read properly and if QoS = "At least once" or "Exactly once" messages could be sent duplicated.

[*] : Fixed Bug MQTT client, after reconnect queued messages where not published.

[*] : Fixed Memory Leak in STOMP Protocol component when destroying object.

[*] : Fixed Error compiling in Lazarus for Linux with unit sgcWebSocket_Resources, unit name was incorrect.

[*] : Fixed Bug HTTP API Server, when adding new binding with a parameter, this was not read properly in some cases.

[*] : Fixed Bug HTTP API Server, size of payload message was not calculated properly.

[*] : Fixed Bug HTTP API Server, only one thread was created to handle client connections.

[*] : Fixed Bug HTTP API Server, disconnect event was not called in some cases.

[*] : Fixed Memory Leak in HTTP API Server, internal heartbeat timers were not destroyed.

[*] : Fixed some minor Bugs HTTP API Server.

[*] : Fixed Bug in QueueLevel properties, if there is a disconnection before all queues are processed a memory leak can occur.

[*] : Fixed Bug using Queues, in some cases stream was not saved properly.

[*] : Fixed Bug LoadBalancer calculating server client connections count.

[*] : Fixed Bug error "invalid pointer", notifying subscription/unsubscription when notifyEvents = neAsynchronous.

With sgcWebSockets 4.1.10 we introduce a new API

  • CEX.IO: is a cryptocurrency exchange and former Bitcoin cloud mining provider.

There is a new protocol:

 

 Full List of Changes:

 

[+] : New Client Component TsgcWSAPI_Cex,  is a cryptocurrency exchange and former Bitcoin cloud mining provider.

[+] : New WebSocket Server Protocol: AppRTC, is a WebRTC server using AppRTC Demo code.

[+] : New Demo for AppRTC protocol.

 

[*] : Fixed Bug when calling disconnect, some methods where called more than once.

[*] : Fixed Bug TThread calling terminate before Execute method has been called.

[*] : Fixed Bug OnException event, sometimes Exception parameter was corrupted.

[*] : Fixed Bug WebRTC protocol, remote video was not working.

[*] : Fixed some stability issues in websocket client component in high load connections.

[*] : Fixed Bug File Protocol when call WriteData method. 

[*] : Fixed Bug File Protocol when Files.BufferSize = 0 and Files.QoS.Level = qosLevel1 or qosLevel2, when a file was sent never end.

[*] : Fixed Bug List Index Out of Bounds in some cases when trying to access to Channels Subscribed.

 

[/] : Properties RecBytes and SendBytes of TsgcWSConnection now are Int64.

[/] : WebRTC protocol, now remote video is assigned in sgcaddstream event. 

With sgcWebSockets 4.1.8 we introduce 2 new APIs 

  • Binance: is an international multi-language cryptocurrency exchange
  • Bitstamp: is one of the world's longest standing crypto exchange, supporting the blockchain ecosystem since 2011.

 

 Full List of Changes:

 [+] : New Client Component TsgcWSAPI_Binance, is an international multi-language cryptocurrency exchange

 [+] : New Client Component TsgcWSAPI_SocketIO, replaces TsgcWebSocketClient_SocketIO (will be deprecated on future versions).

 [+] : New Client Component TsgcWSAPI_Bitstamp, Bitstamp is one of the world's longest standing crypto exchange, supporting the blockchain ecosystem since 2011.

 [+] : If there is an error connecting to a WebSocket server, now HTTP error code is showed in OnError event.

 

 [*] : Fixed Bug CBuilder 10.2.3 in static link library for Indy "inline __fastcall TIdEncoderMIME(System::Classes::TComponent* AOwner)..."

 [*] : Fixed Bug Pusher Protocol error "invalid path error" when connect to server.

 

With sgcWebSockets 4.1.9 we introduce 1 new API

  • Huobi: is an international multi-language cryptocurrency exchange

There is a new server:

  • TsgcWSHTTPWebBrokerBridgeServer: use TIdHttpWebBrokerBridge as server base and is useful if you want to use a single server for DataSnap, HTTP and WebSocket connections.

 

 Full List of Changes:

[+] : New Server TsgcWSHTTPWebBrokerBridgeServer, which allows combine HTTP, DataSnap and WebSocket requests using the same server and port.

[+] : New Client Component TsgcWSAPI_Huobi, is an international multi-language cryptocurrency exchange

[+] : New Demo WebBrokerBridge, shows a simple datasnap and websocket server.

[+] : New Demo AndroidService, shows how a websocket client can run as Android service and show a notification every time receives a message.

[+] : Added Pusher Tab in Client Demo.

[+] : New Method WriteAndWaitData in TsgcWSConnection, sends a message and waits response from other peer.

[+] : OnException event now provides original exception if exists.

[+] : Added support for authentication methods TsgcWebSocketServer_HTTPAPI Server.

[+] : New Event OnHTTPRequest in TsgcWebSocketServer_HTTPAPI server component, now server can handle websocket and HTTP connections.

[+] : New Property Port in TsgcWebSocketServer_HTTPAPI server component, allows to set default listening port.

 

 [*] : Fixed Bug OnWatchdog event, when client starts in a thread method, reconnection now uses thread method too.

 [*] : Fixed Bug SGC Protocol error "list index out of bounds" calling publish method in some scenarios.

 [*] : Fixed Bug in client demo, STOMP was not well linked to MQTT when server was changed.

 [*] : Fixed Bug HTTP API Server, binary messages were not received properly.

 [*] : Fixed Bug HTTP API Server, authentication methods (URL and Basic) didn't work

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

 [*] : Fixed Bug STOMP protocol, content-length header was incorrect if message contains special characters.

 [*] : Fixed Bug WatchDog was not working when Authentication Basic was used behind a Broker Protocol.

 [*] : Fixed Bug Client WebSocket Component, TsgcWSConnection.Free could be called more than once.

 [*] : Fixed Line Break Bug in Compiled HTML Help file.

 [*] : Fixed Bug Broadcasting streams when permessage-deflate compression is enabled.

 

 [/] : Property RegisteredURLs in TsgcWebSocketServer_HTTPAPI now is Bindings.

 

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.