Bitstamp API has updated lo latest version.

 

Changes included

 [+] : New Event AfterConnect in TsgcWSAPI_SocketIO, this event is called after socket.io connection is successful and client can send messages to server.

 [+] : New Property Socket.IO Polling in TsgcWSAPI_SocketIO, disabling this property, client will connect directly to server using websocket as transport.

 [+] : Updated Bitstamp API to version 2.

 [+] : New Event OnCommandRequest on TsgcWSHTTPWebBrokerBridgeServer component, when server gets a new http request, this event is called and here you can customize http response.

 [+] : New Property ClearReceivedStreamsOnDisconnect on Files Protocol, if disabled, when reconnects, try to resume file download for qosLevel2.

 [+] : New Property ClearSentStreamsOnDisconnect on Files Protocol, if disabled, when reconnects, try to resume file upload for qosLevel2.

 [+] : New Property TCPEndOfFrameScanBuffer in TsgcWSConnection class, allows to define which method use to find end of message.

eofScanNone: every time a new packet arrive, OnBinary event is called.

eofScanLatestBytes: if latest bytes are equal to bytes added with AddTCPEndOfFrame method, OnBinary message is called, otherwise this packet is buffered

eofScanAllBytes: search in all packet if find bytes equal to bytes added with AddTCPEndOfFrame method. If true, OnBinary message is called, otherwise this packet is buffered

 [+] : New Method AddTCPEndOfFrame in TsgcWSConnection class, if connection is plain TCP, allows to set which byte/s define the end of message. Message is buffered till is received completely.

 [+] : Updated File Protocol, now SendFile/BroadcastFile accepts FileId as parameter, if FileId is blank, will work as before, value will be assigned automatically.

 

 [*] : Fixed Bug Server Protocol searching channel subscriptions when channel is empty.

 [*] : Fixed Bug WriteAndWaitData method, doesn't wait in Android and iOS.

 [*] : Fixed Bug Ping with Timeout, doesn't wait in Android and iOS.

 [*] : Fixed Bug Connect method for client component, doesn't wait in Android and iOS.

 [*] : Fixed Bug Disconnect method for client component, doesn't wait in Android and iOS.

 [*] : Fixed Bug Internal Timer for QoS Level2, doesn't work after a reconnect.

 [*] : Fixed Bug Socket.IO client, if Heartbeat enabled and timeout > 0, connection always disconnect after timeout.

 [*] : Fixed Bug Server File Protocol, property files doesn't read assigned values and always use default.

 [*] : Fixed Bug File Protocol, if sending a file using qosLevel2, there was a disconnection, after reconnect, process won't continue.

 [*] : Fixed Bug MQTT Protocol decoding QoS for Publish messages.

 [*] : Fixed Bug MQTT Protocol reading Packet Identifier for Publish messages.

 [*] : Fixed Bug MQTT Protocol writing Packet Identifier when was greater than 255.

 [*] : Fixed Bug TsgcWebSocketServer_HTTPAPI, when a client send a POST method, content property was empty.

 [*] : Fixed Bug Detecting HTTP POST Header when version is 1.0.

 [*] : Fixed Bug Detecting WebSocket Header when client sends a POST with websocket headers.

 [*] : Fixed Bug during HTTP negotiation for BITTREX Component, now requires TLS 1.2 to connect to server.

 [*] : Fixed Bug SignalR API component, now HTTP negotiation takes TLS version from TLSOptions of TsgcWebSocketClient component.

 [*] : Fixed Bug CBuilder reading CleanDisconnect property, now this property is public instead of published for CBuilder.

 [*] : Fixed Bug File Server Protocol calling BroadcastFile method (abstract error) when HTTP API Server is attached.

 [*] : Fixed Bug File Server Protocol, list index out of bounds processing acknowledgment.

 

From sgcWebSockets 4.2.4 Azure IoT is supported

IoT Hub is a managed service, hosted in the cloud, that acts as a central message hub for bi-directional communication between your IoT application and the devices it manages. You can use Azure IoT Hub to build IoT solutions with reliable and secure communications between millions of IoT devices and a cloud-hosted solution backend. You can connect virtually any device to IoT Hub.

 

Changes included

 [+] : New Component "TsgcIoTAzure_MQTT_Client", MQTT client to connect to Azure IoT Server Broker.

 [+] : New Client API TsgcWSAPI_FXCM, is a retail broker for trading on the foreign exchange market.

 [+] : New property TLSOptions in TsgcWebSocketClient, allows to set Certificates filenames, certificate password and TLS Version.

 [+] : Updated WebBrokerBridge demo to enable SSL connections.

 

 [*] : Fixed Bug TsgcWebSocketServer_HTTPAPI, Disconnect event was called for HTTP requests.

 [*] : Fixed Bug TsgcWebSocketServer_HTTPAPI, Disconnect event was not called for connections being abruptly closed.

 

 [*] : Fixed Bug TsgcWS_API_SocketIO, namespace was not registered when client connect to socket.io server.

 

From sgcWebSockets 4.2.3 Amazon AWS IoT is supported

AWS IoT provides device software, control services, and data services. Device software enables you to securely connect devices, gather data, and take intelligent actions locally, even when Internet connectivity is not available. Control services allow you to control, manage, and secure large and diverse device fleets. Data services help you extract value from IoT data.

Good candidates for Amazon AWS IoT:

  • Industrial: AWS IoT customers are building industrial IoT applications for predictive quality and maintenance and to remotely monitor operations.  
  • Connected Home: AWS IoT customers are building connected home applications for home automation, home security and monitoring, and home networking.
  • Commercial: AWS IoT customers are building commercial applications for traffic monitoring, public safety, and health monitoring.

 

Changes included

 [+] : New Component "TsgcIoTAmazon_MQTT_Client", MQTT client to connect to Amazon AWS IoT Server Broker.

 [+] : New Method "Connect" TsgcWebSocketClient, try to connect to the server and wait till the connection is successful.

 [+] : New Method "Disconnect" TsgcWebSocketClient, try to disconnect from the server and wait till disconnection is successful.

 [+] : New method "Invite" Client Presence protocol, allows sending an invitation to another member to subscribe to a channel.

 [+] : If TsgcWebSocketClient.Options.CleanDisconnect = True, when set Active := False, client sends a message to the server to close connection.

 [+] : New Property in HTTP API Server, Asynchronous, if enabled, messages are sent asynchronously, by default is disabled so waits till a message is sent to client.

 [+] : New Event in HTTP API Server, OnAsynchronous, this event is called after an asynchronous completion call.

 

 [*] : Fixed Bug TsgcWebsocketServer_HTTPAPI, if there was an error sending heartbeat to a client, the process not continue with the next client.

 [*] : Fixed Bug TsgcWebSocketServer_HTTPAPI, SSLHash was not set in NewBinding method.

 [*] : Fixed Bug TsgcWebsocketServer_HTTPAPI, GetURL was not implemented.

 [*] : Fixed Bug TsgcWebsocketServer_HTTPAPI, if connections are free delayed, when a protocols was attached, connection was not added to queue.

 [*] : Fixed Memory Leak in TsgcWebSocketServer_HTTPAPI server component.

 [*] : Fixed Bug STOMP Protocol when NotifyEvents = neNosync, events where not called.

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]