******************************************************* sgcWebSockets .NET ******************************************************* [*] : Bug [+] : New [-] : Deleted [/] : Breaking changes Versions -------- 2026.8.0: 2026 August [+] : A graceful STOMP Disconnect now waits until the broker confirms it with a receipt, so nothing is lost when closing. The new DisconnectTimeout option controls how long to wait (10 seconds by default, 0 returns immediately as before). [+] : The WebSocket server now limits how many control frames a client may send each second (100), so it cannot be flooded with pings. [+] : The SChannel server can now check the certificate of the clients that connect to it. Set SSLOptions.VerifyCertificate to True and the client certificate goes through the same checks a client applies to a server certificate, the chain and the dates, without the host name check. SSLOptions.VerifyCertificate_Options.FailIfNoCertificate decides what happens when a client sends none, rejecting the connection when True and letting it in when False (False by default). Until now the server never asked the client for a certificate. [*] : Fixed TLSOptions.Version being ignored by the SChannel IO handler. On Windows 11 and Windows Server 2022 it was not read at all, on Windows 10 asking for tls1_3 silently gave TLS 1.2, and leaving it undefined switched SSL 3.0, TLS 1.0 and TLS 1.1 back on. Version is now honoured on both paths, the negotiated version is checked when the handshake completes and the connection fails if it falls outside what was asked for, SSL 3.0 is never requested, and asking for tls1_3 where the platform cannot provide it fails with a message saying why. [*] : Fixed the SChannel IO handler losing every TLS setting on the connections opened on the side, such as an HTTP redirect to another host, and on the client IO handler a SChannel server builds for the connections it opens itself. The clones came back empty, so they ran with VerifyCertificate off and no cipher list, TLS version or ALPN list, and nothing reported it. They now carry the full configuration. [*] : Fixed the SChannel connections after a TLS renegotiation: a new certificate was accepted with no check of the chain or the host name, and the record sizes of the original cipher were kept, so everything sent and received was laid out with the wrong sizes. The full check now runs again whenever the certificate is not the one already accepted, the connection is dropped when it does not pass, and the sizes are read again on every handshake. [*] : Fixed a client using the SChannel IO handler never noticing that the connection was gone when the other end dropped it without a TLS close notification, as happens when a proxy restarts. OnDisconnect never fired, Connected stayed True and the reconnect and WatchDog machinery never ran. [*] : Fixed a client using the SChannel IO handler never completing a TLS 1.3 connection. The session ticket the server sends straight after the handshake left the client waiting for data the server had already sent, so the connection never opened and neither OnConnect nor OnError ever fired. [*] : The TLS handshake and every read of the SChannel IO handler are now bounded. The handshake honours ConnectTimeout instead of covering only the TCP connect, so a peer that accepts the socket and then goes silent no longer blocks the thread for ever, and a peer that sends a record a few bytes at a time can no longer hold the reader past the read deadline. [*] : Fixed a startup race in the SChannel IO handler where two connections opened at the same time could see initialization as complete before it actually was, an intermittent access violation. A single connection's handshake error could also unload the shared SSPI library while other SChannel connections were still using it. [*] : A connection using the SChannel IO handler now sends the TLS close notification before closing, on clients and servers, so a normal disconnect is no longer seen by the other end as a connection cut short, which several exchanges log or rate-limit. It is sent only when it can go out immediately, so closing is never delayed. [*] : Fixed every exchange WebSocket API resending its whole subscription list in one burst after reconnecting, on a connection a few milliseconds old, so an exchange that limits messages per second closed it straight away and the cycle repeated. The replay is now paced. It affects Binance, Bitfinex, Bitget, Bitmex, Bitstamp, Bybit, Cex, CexPlus, Coinbase, CryptoCom, Deribit, GateIO, Huobi, Kraken, Kucoin, MEXC and OKX. [*] : Fixed memory leaks and random crashes when stopping the IOCP/EPOLL server engine while it was busy, and a buffer lost on every message processed with worker threads, a leak that grew with traffic. [*] : Fixed the IOCP and EPOLL servers leaking connections and handles, and crashing, on several cleanup paths: a client dropping the line right after being accepted (a port scan or aborted TLS handshake), a client aborting while a read was pending, a connection released twice when the server was stopped mid-cleanup, an aborted connection consuming an accept slot that was never returned, and a use-after-free with worker threads enabled. [*] : Fixed HTTP keep-alive not working on the IOCP and EPOLL servers. The connection was closed after each request, so the server filled with sockets in TIME_WAIT. Connections now stay open between requests, as with the classic thread engine. [*] : Fixed a memory leak in the Linux (EPOLL) server where every HTTP request leaked pieces of the parsed request, growing with request size until the server ran out of memory. The classic thread engine was not affected. [*] : Fixed the EPOLL server (Linux) sharing one connection queue across all its worker threads, where one or two threads did almost all the work while the rest stayed idle. Each worker now has its own queue. [*] : Fixed the TLS IOCP and EPOLL servers writing past the end of their read buffer when a client sent several encrypted records together, which could overwrite adjacent memory and crash the server, and crashing when a connection could not be set up, for example at the connection limit or when a client dropped during the handshake. The plain TCP servers already handled this correctly. [*] : Fixed an "invalid pointer operation" crash in clients using ConnectTimeout, when the connection attempt finished as its helper thread was being disposed of. [*] : The WebSocket server now validates the opening handshake as the standard requires. A missing or non-13 version is refused, a handshake that does not finish within ten seconds is closed, and the number and length of headers are limited. A configured allowed-origins list is now also applied when a client sends no origin at all. [*] : The WebSocket connection now rejects invalid frames instead of accepting them: data frames masked by a server, frames setting reserved bits no active extension defines, and close messages whose reason text carried an invalid close code. [*] : The WebSocket client now builds its handshake key with a secure random generator, and the server's user name and password check now takes the same time whether or not the password is close to correct, so the response time no longer leaks a hint. [*] : When a client closes a WebSocket connection, the server now sends its own close message back before disconnecting, completing the closing handshake instead of just dropping the connection. This is now the default. [*] : Fixed the MQTT client building invalid packets that brokers rejected: a CONNECT with a user name but no password (or the reverse), and any MQTT 5 packet carrying a larger block of properties. Also fixed it getting stuck after a broken packet on plain TCP, and two threads publishing at once picking the same packet identifier. [*] : Fixed the MQTT 5 client misreading broker replies and reading past the end of a packet. A CONNACK Maximum QoS was read from the wrong byte, SUBSCRIBE and UNSUBSCRIBE replies with a long reason text reported the wrong QoS levels, and a truncated packet made it hand whatever followed in memory to the application as property values. Lengths and properties are now checked against the packet before being read. [*] : The MQTT 5 client now honours what the broker tells it: it uses the Keep Alive returned in the CONNACK including for its first ping, passes the real reason code and server reference to OnMQTTDisconnect, raises OnMQTTAuth on an authentication challenge, and delivers a message arriving with only a Topic Alias under its real topic. [*] : Fixed several problems with MQTT QoS 2 publishing. The client now sends the correct follow-up confirmation instead of re-sending the original message, discards a message the broker rejected instead of retrying forever, flags re-sent messages as duplicates, and retries on a sensible schedule instead of on every timer tick. [*] : STOMP messages are now delivered exactly as the broker sent them. Multi-line bodies lost their line breaks and an invisible end-of-frame character was left at the end. The client now uses content-length to read the body, so it can contain any character including line breaks and binary zeros, and header values with special characters are escaped following the STOMP 1.1 and 1.2 rules. [*] : Fixed STOMP frames being lost. Several frames packed into one WebSocket message are all processed now, a frame split across two messages is reassembled, and frames received as binary WebSocket messages are no longer ignored. A malformed frame now fires OnSTOMPError and closes the connection, as the specification requires. [*] : STOMP ACK and NACK now send the headers required by the negotiated version: id for 1.2, message-id plus subscription for 1.1, message-id for 1.0. NACK is no longer sent on STOMP 1.0. Heart-beats now start only after the server confirms the connection and use the agreed intervals, closing the connection if the server goes silent so the WatchDog can reconnect. [*] : STOMP fixes for ActiveMQ: the message priority header was sent without its colon separator so priority was ignored, and unsubscribing did not detect whether the subscription was durable. [*] : Fixed the STOMP client reading far outside a frame when a broker sent a very large content-length, because the check was done with 32 bit maths and overflowed. A body larger than the maximum frame size is now refused, and a frame is limited to 1024 headers. [*] : The AMQP 1.0 client is now protected against a bad broker: reading past the end of its buffer when a frame arrives in small pieces, a frame declaring an invalid header size, messages nested too deeply, a small message crafted to expand into a huge amount of memory, arrays whose items are not text symbols, and a text or symbol field declaring four gigabytes out of a small frame. [*] : The default maximum frame size for AMQP 0.9.1 and 1.0 is now 1 MB instead of practically unlimited, so a broker cannot make the client hold an enormous frame in memory. You can still raise it. The AMQP 0.9.1 client now also closes the connection with "not implemented" on an unrecognized command, as the specification requires. [*] : HTTP/2 header compression is now protected against crafted headers: a small block expanding into a huge amount of memory, a length wrapping around to a negative value, and a read one byte past the end of a block. A malformed compressed header now closes the connection cleanly with the correct error, and continuation frames must belong to the stream they started on. [*] : The HTTP/2 connection now rejects abuse that could crash it or exhaust memory and CPU: a DATA frame for a stream never opened, a flood of PRIORITY frames building unlimited hidden streams, reuse of a stream number, a flood of empty continuation frames, confusion after a stream reset, and an error code that could read outside a fixed internal table. [*] : Fixed HTTP/2 memory growth where reset streams were never cleaned up. The client now also checks that a response's declared length matches what arrived, and rejects conflicting duplicate content-length headers. [*] : Fixed a misleading error when a TLS connection failed, for example "error:00000006:lib(0):func(0):EVP lib". The real reason reported by OpenSSL was discarded before the exception was raised, it is now shown. [*] : Improved the errors reported when loading certificates and using newer algorithms. ML-KEM-768 explains that it needs OpenSSL 3.5 or later and shows the version found, a failed legacy provider reports which provider could not be loaded and where it was searched, and a PKCS#12 file using an old algorithm such as RC2 40-bit explains how to enable the legacy provider. [*] : Fixed a pending OpenSSL error being left behind when the certificate file contained the certificate and private key together, which could affect a later call, and real errors while reading the certificate chain being ignored. The OpenSSL options to disable old TLS versions, compression and renegotiation and to prefer the server cipher order were also ignored with OpenSSL 1.1 or later, and are now applied. [*] : Fixed the OAuth2 server sending the authorization code to whatever address the request asked for. The redirect address was never compared with the one registered, so a crafted link could deliver a user's authorization code to somebody else's site. It must now match exactly. [*] : The OAuth2 server now cleans the application name and requested scopes before showing them on the sign-in page and strips line breaks from the values used to build the redirect address, closing two ways crafted text could run script or add headers. Also fixed it using memory it had already released when the sign-in page ended up empty. [*] : Fixed the WebAuthn server trusting the FIDO metadata file without checking it. With no root certificate set the check was skipped entirely, so a forged file could make the server accept a fake authenticator. The file is now refused when there is nothing to check it against, and the download verifies the server certificate, using the Windows certificate store with no setup. [*] : Fixed the WebAuthn server reading past the end of the certificate extension it examines when a device registers. The decoder checked nothing, so a truncated or deeply nested extension could make the server read unrelated memory and hand it back, run out of stack, or stop. Every field is now checked, nesting is limited and malformed extensions are refused. [*] : Fixed the limit on the number of response headers in the HTTP client never being applied, so a server could send an endless stream of headers until the client ran out of memory. The limit is now enforced. [*] : Fixed the MCP server writing its internal connection id as a message on the event stream a client opens with GET, which clients such as VS Code GitHub Copilot reported as "Failed to parse message". The session id is still returned in the mcp-session-id header. This also covers the HTTP.sys server. [*] : Fixed the MCP server checking where a request came from only when it carried a header browsers never send, so the check never ran for the case it was meant to stop. A web page the user visited could reach an MCP server on their own machine, list its tools, run them and read the results. The origin is now checked on every request, including the browser's preliminary check. If your MCP client runs in a browser, set ValidateOrigin to False. [*] : Fixed the Files protocol deleting and writing files outside the folder it was given. The incoming file name was used almost as it came, and on Windows forward slashes were kept, so a peer could send a name such as ../../../file and reach anywhere on the disk. The delete side had no protection at all. Names are now reduced to a plain file name and checked, on server and client. [*] : Fixed seven STUN attributes reading past the end of the packet when a peer declared a length shorter than the field carried, which could hand unrelated memory to the application or stop the client. It affects the two ICE control attributes, the reservation token, requested address family, requested transport, even port flag, address error code and ICMP attribute. [*] : Fixed the Binance Spot user data stream, which stopped working when Binance retired the listenKey endpoints it was built on. Account, order and balance updates now come from the Binance WebSocket API, over a second connection the component opens by itself and renews after a reconnection. The events arrive in the same shape, so your existing handlers keep working. The new subscription is signed, so Binance.ApiSecret must now be set as well as Binance.ApiKey. Binance.us and Futures still use a listenKey, so Binance.ListenKeyOnDisconnect now applies only to those two. When a private stream cannot be opened, the error now reports the status the server returned and the message Binance sent back, instead of only "ListenKey cannot be empty.". [*] : Fixed the OKX keepalive, it now sends the ping text message the exchange requires instead of a WebSocket ping, and reconnects when no pong comes back. OnOKXSubscribed and OnOKXUnsubscribed now fire on the subscription reply, they never did before. [*] : Fixed the KuCoin keepalive, it now sends the ping message the exchange requires instead of a WebSocket ping, and the pingTimeout returned when the connection opens is used to reconnect when no pong comes back. [*] : Fixed random crashes in the OnException event of the TCP and HTTP/2 components. The exception was destroyed by the thread that raised it before the event ran, so the handler read freed memory and reported a wrong class name. It now receives a valid copy. 2026.7.0: 2026 July [+] : You can tell Connect() to wait until the connection is fully ready before it returns, so nothing runs against a half-ready connection during quick reconnects. [+] : The sgc protocol can now remember recent messages per channel, and a client that drops and reconnects automatically receives whatever it missed. [+] : New optional HTTP-client protections: drop the Authorization and Cookie headers if a redirect sends you to another site, and block a redirect that downgrades HTTPS to HTTP (both off by default). [+] : The HTTP client can retry a request automatically when the server is busy or a connection hiccups, waiting longer each time and honoring the server's Retry-After hint (off by default); the OpenAI, Anthropic and Gemini clients use this too. [*] : Fixed a crash that could occur if the same connection was reported disconnected twice, which could bring the server down under strict memory managers. [*] : Fixed a clean disconnect over TLS taking several seconds; it now finishes immediately and still reports the disconnect exactly once. [*] : Fixed a memory-exhaustion weakness when reading the trailing headers of a chunked response; the number of trailer lines is now limited and their values are read correctly. [*] : Improved redirect handling so relative redirect addresses become full URLs correctly, and the request method and body are kept on 307 and 308 redirects. [*] : Fixed the client giving up on a cookie when its expiry date couldn't be read; it's now treated as a session cookie, and Max-Age still wins over Expires. [*] : Fixed a possible read past the buffer in the MQTT 5 client when a broker claimed more data than it actually sent; lengths are now checked first. [*] : Fixed a similar read past the buffer in the AMQP 1.0 client when decoding a UUID; it now checks the length first and reports a clean error otherwise. [*] : Hardened the STUN/TURN parser against bad packets, fixing an infinite loop, several reads past the buffer (including IPv6 addresses), and missing length checks. [*] : Fixed memory-safety bugs in the UDP client and server (including DTLS) when disconnecting, so a socket is no longer freed twice or left dangling and event handlers get valid peer info. [*] : Fixed a memory bug in the DLL used by the .NET and other language bindings, where returned text could point to already-freed memory; the text now stays valid after the call. [*] : Fixed streamed (Server-Sent Events) responses losing all but the first event when several arrived together, or losing an event split across two reads; this restores token-by-token streaming for the AI/LLM clients. [*] : Hardened the WebAuthn server: challenges now use a secure random generator, each challenge can be used only once, and the clone check follows the latest rules so a zero counter can't slip through. [*] : The OAuth2 authorization server now creates its codes and tokens with a secure random generator and compares the client secret in constant time to close a timing leak. [*] : JWT signatures are now checked in constant time, and a token with a valid signature but a bad claim is now rejected instead of accepted. [*] : Hardened the AMQP client against a bad server: frames on a channel that was never opened are rejected, and the agreed maximum frame size is enforced as soon as the header arrives. [*] : Added internal limits so a misbehaving peer can't grow memory without bound (the MQTT pending-message queue, the sgc protocol's per-connection subscriptions, and the WAMP server's pending calls).. [*] : Fixed Kraken request IDs that could repeat within a millisecond or go backwards after a clock change, which Kraken rejected; they're now always increasing. [*] : Fixed the BitMEX client sending its expiry time in milliseconds when BitMEX expects seconds; it's now sent in seconds. [*] : Fixed the MEXC client signing the plain parameters while sending the encoded ones, which broke the signature for anything needing URL-encoding; they're now encoded before signing. [*] : Fixed the Cryptorobotics client sending two values swapped in some by-hash calls, which hit the wrong item; they're now sent correctly. [*] : Fixed the Deribit client never refreshing its login token, so private calls failed after about 15 minutes; it now refreshes in time and retries once if needed. [*] : Fixed the Forex client hiding an error while reading the account ID, which quietly left you subscribed to prices but not orders, positions or margin; the problem is now reported. [*] : Fixed a memory-safety bug when broadcasting to a channel while a client was disconnecting, which could read freed memory; the client list is now held while the broadcast runs. [*] : Hardened the raw-TCP end-of-frame scanner against a bad stream that could read past the buffer or recurse too deeply. [*] : Added a nesting-depth limit when decoding AMQP field tables, so a deeply nested value can't overflow the stack. [*] : HTTP session IDs in the built-in Indy HTTP server now use a secure random generator, and a small off-by-one that stopped the character "0" from ever appearing is fixed. [*] : Fixed a crash and a possible memory corruption when reading OpenAI message attachments, and fixed an unrelated value being read when the reply had no "incomplete details". [*] : Fixed the server leaking a connection and its socket every time a login failed while authentication was enabled. [*] : Fixed the AMQP client accepting a frame that claimed a negative or impossibly large size. 2026.6.0: 2026 June [+] : New Kafka client component (TsgcWSPClient_Kafka): native Apache Kafka client that speaks the binary Kafka wire protocol over raw TCP. [+] : New Demo in the folder "Demos/02.WebSocket_Protocols/13.Kafka" showing the main features of the Kafka client: connect, produce, subscribe and poll, topic administration and offset management. [+] : New TsgcWebSocketFirewall BotDetection: IP-based bot classification (verified search-engine crawlers, datacenter/hosting ranges, blocklisted IPs) using known-bot CIDR ranges, datacenter ASN ranges, forward-confirmed reverse DNS (FCrDNS) and DNSBL lookups. Classify-only: results are exposed through the new OnBotDetected event and GetBotClassification method without blocking connections. [+] : Improved Firewall demo (Demos\04.WebSocket_Other_Samples\13.Firewall): new "Bot Detection" tab to configure known-bot ranges, datacenter detection, reverse DNS verification and DNSBL zones, with a live "Classify IP" tester. [+] : New TsgcWebSocketFirewall IPv6 support: blacklist and whitelist CIDR matching now works for IPv6 addresses and ranges up to /128, GeoIP loads the GeoLite2 IPv6 country blocks, the bot-range database accepts IPv6 CIDR ranges, and bot detection resolves IPv6 reverse DNS and DNSBL (ip6.arpa) lookups. Addresses are normalized (IPv4-mapped, compressed and zone forms) so a client is tracked consistently across spellings. IPv4 behaviour is unchanged. [+] : New STDIO transport for the MCP server and client. The MCP server can now run over standard input/output through the new TsgcAI_MCP_Server_Stdio host, so it can be spawned as a local subprocess by MCP clients. [*] : Fixed path traversal in TsgcWebSocketHTTPServer static file serving (HTTP/1.x and HTTP/2): a URL containing "../" could read files outside DocumentRoot. The resolved path is now canonicalized and rejected when it escapes the document root. [*] : Fixed possible HTTP response header injection (CRLF) in TsgcWebSocketServer_HTTPAPI: CR and LF characters are now stripped from response header values such as Location, ETag and Server. [*] : Fixed cross-thread use-after-free in TsgcIdSSLIOHandlerSocketSChannel (SChannel SSL): Readable and RecvEnc now access SSL.Handle inside the SSL critical section (DoEnterCS/DoLeaveCS), matching SendEnc/Connected/CloseSSL and preventing a race when another thread closes the connection mid-read. [*] : Fixed WebSocket frame parsing when a frame header arrives split across TCP segments under high throughput. The fixed-size header fields (16-bit/64-bit extended payload length and the 4-byte mask key) are now read in full before being parsed, instead of indexing a read buffer that held fewer bytes than requested. With range checking disabled this could yield a corrupt payload length and drop or garble the message. (Thanks to Jacques for the fix). [*] : Fixed possible Denial of Service in TsgcWebSocketServer, TsgcWebSocketHTTPServer and TsgcWebSocketServer_HTTPAPI (http.sys): a client could exhaust server memory with oversized messages, endless message fragmentation or a permessage-deflate "zip-bomb". Messages are now bounded by a maximum size and rejected (close 1009) when exceeded. [*] : Fixed 64-bit WebSocket frame length parsing: a length with the high bit set is now rejected instead of being truncated. [*] : Fixed Bug TIdSSLIOHandlerSocketOpenSSL: the peer-verification callback could fail open and accept an untrusted certificate even when verification was requested. Enable the new TIdSSLOptions.StrictVerify option to enforce the OpenSSL verification result. [*] : Fixed Bug TIdCustomHTTPServer: the chunked transfer-encoding trailer-header loop was unbounded, allowing a memory and CPU exhaustion DoS. It is now bounded by MaximumHeaderLineCount. [*] : Fixed excessive memory usage serving static files from DocumentRoot in TsgcWebSocketHTTPServer (HTTP/1.x and HTTP/2). Each request loaded the whole file into memory with a TMemoryStream per connection, so large files or many concurrent downloads could exhaust RAM (for example 100 connections serving a 1 GB file used about 100 GB), and slow-reading clients kept those copies resident. Files are now streamed from disk with a read-only shared TFileStream, so server memory stays flat regardless of file size and connection count. [*] : Fixed wrong MQTT 5.0 property identifiers in TsgcWSPClient_MQTT: the Subscription Identifier property in PUBLISH packets was written as 0x11 (Session Expiry Interval) instead of 0x0B, and the Server Reference property in DISCONNECT packets was written as 0x22 (Topic Alias Maximum) instead of 0x1C, so strict MQTT 5.0 peers could misparse or reject the packets. [*] : Fixed Bug TsgcWSPClient_STOMP (and the STOMP broker clients): with the default HeartBeat settings (Enabled = True, Outgoing = 0) the client flooded the server with heart-beat frames, because on connect the WebSocket client heartbeat interval was set to 0 seconds and the timer fired continuously. [*] : Fixed TsgcWSPClient_AMQP1 not sending messages larger than the negotiated max-frame-size; the outgoing transfer is now split across multiple frames, so large AMQP 1.0 messages are delivered. [*] : Fixed WAMP v1 PUBLISH writing the exclude and eligible lists in the wrong order and the server ignoring them, so the publisher could receive its own event and the exclude/eligible filtering had no effect. [*] : Fixed TsgcWSPClient_Files routing file-sent-error notifications to the component instead of the target connection, so the client was never told a transfer failed. [*] : Fixed TsgcWSPServer_Presence not freeing empty channels (DeleteChannel was a no-op), so channels accumulated for the lifetime of the server. [*] : Fixed E2EE EC public keys being emitted with explicit curve parameters instead of the named-curve form, which strict importers rejected; OpenSSL reads both forms. [*] : Fixed the Server-Sent Events fallback sending the retry value multiplied by 1000 (about 50 minutes for the 3000 default); the configured value in milliseconds is now sent unchanged. [*] : Fixed TsgcSTUNClient building the transaction id from a low-entropy ASCII range; it now uses a full 96-bit cryptographically-random transaction id. [*] : Fixed TsgcTURNClient ChannelData length field including the padding bytes, which broke interop with standard TURN servers; the length now excludes padding per RFC 5766. [*] : Fixed TsgcWSAPI_Bybit option market using swapped production and testnet stream hosts. [*] : Fixed TsgcWSAPI_Kraken spot subscriptions producing malformed JSON when a reqId was set; the reqId is now appended instead of overwriting the message head. [*] : Fixed TsgcWSAPI_MEXC mini-tickers stream never being created due to an inverted check, so mini-ticker subscriptions returned no data. 2026.5.0: 2026 May [+] : New TsgcWSAPI_Forex component: supports unified REST + streaming for Forex.com. [+] : New Demo for Forex.com: GUI demo in "Demos\05.Crypto\22.Forex" covering login, connectivity ping, live market watch, positions, active orders, trade history, stop/limit history and simulate trade, with credentials persisted to sgcForexDemo.ini. [+] : New TsgcWSPClient_Lightstreamer component: generic Lightstreamer TLCP 2.5 client, reusable for any Lightstreamer server (Forex.com, IG Markets, etc.). Implements create_session, bind_session, control (subscribe / unsubscribe) and the LOOP auto-rebind + subscription replay after reconnect. [+] : Improved EPOLL IOHandler (Linux): new properties AcceptBatchSize, WaitTimeoutMS and HandshakeTimeoutMS. [+] : Improved EPOLL IOHandler (Linux): EPOLLOUT-driven write backpressure. When send() returns EAGAIN on a partial write, the remaining bytes are captured in a per-connection pending buffer and the socket is re-armed with EPOLLIN|EPOLLOUT; the reactor flushes the tail on the next EPOLLOUT event. [+] : Improved IOCP IOHandler (Windows): new ThreadAffinity property (default False) on TsgcIndy_IO_Engine. When enabled, engine threads are pinned round-robin to logical cores via SetThreadAffinityMask, reducing cross-core cache traffic on high-core-count systems. [+] : Improved IOCP IOHandler (Windows): new TsgcIndy_IO_EngineMetrics record and readonly Metrics property exposing AcceptsPosted, AcceptsCompleted, ReadsPosted, ReadsCompleted, ActiveConnections, BytesRead and BytesWritten counters. Metrics are maintained by the engine with critical-section-protected increments. [+] : Improved IOCP IOHandler (Windows): new SendBufferSize, ReceiveBufferSize and TCPNoDelay properties on TsgcIndy_IOHandler_IO_IOCP. Applied in AfterAccept via setsockopt (SO_SNDBUF, SO_RCVBUF, TCP_NODELAY) so per-connection tuning no longer requires a custom OnConnect handler. [+] : Improved IOCP IOHandler (Windows): TsgcPerIoDataPool capacity raised from 256 to 2048, avoiding the GetMem/FreeMem heap fallback under high connection concurrency. Measured +15-18% WebSocket throughput on loopback benchmarks. [+] : Improved MCP Server: built-in OAuth 2.1 flow for browser-based connectors (claude.ai). Auto-serves /.well-known/oauth-authorization-server (RFC 8414), /.well-known/oauth-protected-resource (RFC 9728), /oauth/register (RFC 7591 DCR), /oauth/authorize (HTML consent form) and /oauth/token (PKCE S256 + refresh tokens). [+] : Improved MCP Server: CORS support with origin reflection and HSTS (Strict-Transport-Security: max-age=31536000) on all responses; OPTIONS preflight returns 204 with full Access-Control-* headers. [*] : Fixed MCP Server: missing/invalid credentials now return 401 Unauthorized with a WWW-Authenticate: Bearer header pointing at the protected resource metadata, instead of 500 Internal Server Error. Required for OAuth discovery by browser-based MCP clients. [*] : Fixed MCP Server: OPTIONS requests no longer hit the JSON-RPC parser (was returning 500 "Invalid jsonrpc Value"). CORS preflight is now handled before authentication and before the MCP body parser. [*] : Fixed IOCP IOHandler (Windows): TsgcIndy_IO_Engine_IOCP_Base.DoStopThreads was calling WaitForMultipleObjects on an array of DWORD thread IDs (FThreadsId) instead of thread HANDLES. [*] : Fixed IOCP IOHandler (Windows): pending I/O operations on sockets are now cancelled on shutdown and on per-socket close. [*] : Fixed IOCP IOHandler (Windows): replaced the fragile Overlapped.Internal = STATUS_PENDING probe in DoFreePerIoData with an explicit Completed: Boolean flag on TsgcPerIoData. [*] : Fixed IOCP/EPOLL IOHandler worker pool: TsgcIndy_IO_WorkOpThread.Run issued sleep(1) on every iteration, including after a task was processed, capping each worker at ~1000 ops/s even when the queue had backlog. [*] : Fixed MCP Server: tool descriptions, prompt messages and resource contents containing non-ASCII characters broke MCP client connections because the JSON body was not ASCII-safe while the HTTP header declared charset=utf-8. [*] : Fixed MCP Server: tool, prompt, resource, root, template, completion-ref and completion-argument 'name' fields containing non-ASCII characters were emitted/read as raw UTF-16 code points rather than JSON \uXXXX escapes. [*] : Fixed HTTP/2 WebBrokerBridge: "Invalid pointer operation" on sgcFree(oResponse) in TsgcWSHTTPServer.OnHTTP2RequestEvent when DataSnap REST handled an HTTP/2 HEADERS-only frame. 2026.4.0: 2026 April [+] : New TsgcWSFirewall component: full-featured firewall for WebSocket servers with IP blacklist/whitelist (CIDR support), brute force protection with auto-ban, SQL injection detection, XSS detection, rate limiting, and flood protection. [+] : New Demo for Server Firewall: shows the main features of the new Firewall and is located in the folder: "Demos\04.WebSocket_Other_Samples\13.Firewall". [+] : New Demo for HTTP/2 Large File Transfer: server + client demo for testing 1GB+ file downloads via HTTP/2, located in "Demos\20.HTTP_Protocol\13.HTTP2_LargeFile_Transfer". [+] : New OAuth2 Client Token Revocation support (RFC 7009): Revoke() method with OnBeforeRevokeToken, OnAfterRevokeToken, and OnRevokeTokenError events. [+] : New OAuth2 Client Token Introspection support (RFC 7662): Introspect() method with OnBeforeIntrospectToken, OnAfterIntrospectToken, and OnIntrospectTokenError events. [+] : New OAuth2 Client Device Authorization Grant (RFC 8628): auth2DeviceCode grant type with automatic polling, OnDeviceCode and OnDeviceCodeExpired events. [+] : New OAuth2 Server Token Revocation endpoint (RFC 7009): /sgc/oauth2/revoke with OnOAuth2AfterRevokeToken event. [+] : New OAuth2 Server Token Introspection endpoint (RFC 7662): /sgc/oauth2/introspect with OnOAuth2AfterIntrospectToken event. [+] : New OAuth2 Server Device Authorization endpoint (RFC 8628): /sgc/oauth2/device and /sgc/oauth2/device/verify with OnOAuth2DeviceAuthorization and OnOAuth2DeviceCodeVerification events. [+] : New OAuth2 Server Resource Owner Password Credentials grant handling (password grant_type). [+] : New OAuth2 Server Device Code token exchange (urn:ietf:params:oauth:grant-type:device_code grant_type). [+] : New OAuth2 Client DPoP support (RFC 9449): sender-constrained tokens via DPoPOptions with ES256/RS256 signing, automatic DPoP proof JWT generation, JWK thumbprint calculation (RFC 7638), and DPoP-Nonce retry handling. [+] : New OAuth2 Client DPoP methods: GetDPoPProof() for resource requests, GetDPoPJWKThumbprint() for token binding verification. [+] : New OAuth2 Server DPoP support (RFC 9449): DPoP proof validation, JWK thumbprint token binding, token_type DPoP issuance, and OnOAuth2ValidateDPoP event. [+] : Improved Deflate extension: the speed has been improved specially for small messages. (Thanks to Michael for the fix). [+] : New Gemini API: Google Gemini integration with Content Generation (with streaming), Vision, Structured JSON Output, Tool Use (function calling), Token Counting, Embeddings, and Model listing. [+] : New DeepSeek API: DeepSeek integration with Chat Completions (with streaming), Vision, Tool Use (function calling), and Model listing. [+] : New Ollama API: Ollama local LLM integration with Chat Completions (with streaming), Model Management (show, pull, delete, list tags), and Embeddings. [+] : New Grok API: xAI Grok integration with Chat Completions (with streaming), Vision, Tool Use (function calling), and Model listing. [+] : New Mistral API: Mistral AI integration with Chat Completions (with streaming), Vision, Structured JSON Output, Tool Use (function calling), Embeddings, and Model listing. [*] : Fixed HTTP/2 server-side streaming for large responses: Eliminates out-of-memory crashes when serving large files and reduces peak server memory. [*] : Fixed HTTP/2 client-side memory reallocation when receiving large responses: payload buffer now uses a capacity growth strategy with platform-specific caps (128 MB on Win32, 1 GB on Win64) instead of reallocating on every DATA frame. [*] : Fixed HTTP/2 SSL write deadlock on large file transfers: WINDOW_UPDATEs are now queued and flushed between read iterations instead of being written inline during frame processing, preventing both client and server from blocking simultaneously on SSL_write. [*] : Fixed HTTP/2 Integer overflow for files larger than 2 GB: changed FrameLength, Offset, WindowSize, PayLoadCapacity, ReadWindowSize, and flow control accumulators from Integer to Int64. [*] : Fixed HTTP/2 stream state: RST_STREAM frames received on idle streams (after stream cleanup) now gracefully transition to closed instead of raising a PROTOCOL_ERROR. [*] : Fixed HPACK encoder: GetBestMatchingIndex now correctly returns static table name-only matches, preventing compression errors on HTTP/2 connections. [*] : Fixed HPACK encoder: Huffman bit mask uses correct shift-left operation. [*] : Fixed HPACK decoder: byte count and available bytes calculations now correctly account for the buffer offset. [*] : Fixed SetBytesFromInteger: intermediate byte extractions now masked with $FF to prevent range check errors on values like WINDOW_UPDATE increments. [*] : Fixed typed pointer incompatibilities when compiling with the option active "Typed @ operator". [*] : Fixed JWT RSA signing: vLength parameter in DoSignRSA was declared as Integer instead of TIdNativeUInt, causing potential stack corruption on 64-bit platforms. (Thanks to Gabriel for the fix). [*] : Fixed Win64 pointer truncation in sgcHTTP_API_OpenAI: mciSendCommand calls used Cardinal() cast on pointers, replaced with NativeUInt(). [*] : Fixed OAuth2 Server: SetOAuth2Options memory leak fixed. [*] : Fixed Bitfinex access violation when unsubscribe from a channel. [*] : Fixed memory leaks in Indy Servers caused by thread-unsafe lazy initialization of FSpecifications and FConnections fields. Concurrent Indy worker threads could race on creation, orphaning instances. 2026.3.0: 2026 February [+] : Added Client events: OnBeforeDisconnect, OnRedirect, OnLoadBalancerError. [+] : Added sgc Protocol Client component (TsgcWSProtocol_sgc_Client) with Subscribe, UnSubscribe, UnSubscribeAll, Broadcast, RPC, Notify, Publish, GetSession, StartTransaction, Commit, RollBack, WriteData methods and OnSubscription, OnUnSubscription, OnEvent, OnSession, OnAcknowledgment, OnRPCResult, OnRPCError events. [+] : Added sgc Protocol Server component (TsgcWSProtocol_sgc_Server) with Publish, RPCResult, RPCError, Broadcast, ClearQueue methods and OnBeforeSubscription, OnSubscription, OnUnSubscription, OnNotification, OnRPC, OnRPCAuthentication events. [+] : Added Broker Client component (TsgcWSBroker_Client) with OnConnect, OnDisconnect, OnMessage, OnError events. [+] : Added SocketIO Client Ping method. [+] : Added Binance Futures subscribe/unsubscribe methods: ContinuousKLine, CompositeIndex, ContractInfo, AssetIndex, AllAssetIndex, IndexPrice, IndexPriceKLine, MarkPriceKLine. [+] : Added STOMP Protocol Client component (TsgcWSProtocol_STOMP_Client) with Subscribe, Unsubscribe, Send, Ack, Nack, Begin, Commit, Abort methods and OnSTOMPConnected, OnSTOMPMessage, OnSTOMPReceipt, OnSTOMPError events. [+] : Added STOMP RabbitMQ Client component (TsgcWSProtocol_STOMP_RabbitMQ_Client) with CreateQueue, DeleteQueue, BindQueue, UnBindQueue, CreateExchange, DeleteExchange methods for RabbitMQ integration. [+] : Added STOMP ActiveMQ Client component (TsgcWSProtocol_STOMP_ActiveMQ_Client) for ActiveMQ integration. [+] : Added WAMP v1 Protocol Client component (TsgcWSProtocol_WAMP_Client) with Prefix, Subscribe, UnSubscribe, Call, CancelCall, Publish methods and OnWAMPWelcome, OnWAMPCallResult, OnWAMPCallError, OnWAMPEvent events. [+] : Added WAMP v2 Protocol Client component (TsgcWSProtocol_WAMP2_Client) with Subscribe, UnSubscribe, Publish, Call, Register, UnRegister, Yield methods and OnWAMP2Welcome, OnWAMP2Subscribed, OnWAMP2Event, OnWAMP2Result, OnWAMP2Error, OnWAMP2Challenge events. [+] : Added E2EE Protocol Client component (TsgcWSProtocol_E2EE_Client) with SendDirectMessage, SendGroupMessage, SendDirectMessage_Bytes, SendGroupMessage_Bytes, CreateGroup, DeleteGroup methods and OnE2EEMessage, OnE2EEBeforeEncrypt, OnE2EEAfterDecrypt events. [+] : Added Presence Protocol Client component (TsgcWSProtocol_Presence_Client) with Subscribe, UnSubscribe methods and OnPresenceData, OnPresenceSubscribed, OnPresenceUnSubscribed events. [+] : Added Presence Protocol Server component (TsgcWSProtocol_Presence_Server) with OnPresenceSubscribe, OnPresenceUnSubscribe, OnPresenceData events. [+] : Added Broker Protocol Server component (TsgcWSProtocol_Broker_Server) for WebSocket message brokering. [+] : Added Bitfinex API Client component (TsgcWS_API_Bitfinex). [+] : Added BitMEX API Client component (TsgcWS_API_Bitmex). [+] : Added Bitstamp API Client component (TsgcWS_API_Bitstamp). [+] : Added Bybit API Client component (TsgcWS_API_Bybit). [+] : Added CEX.IO API Client component (TsgcWS_API_Cex). [+] : Added CEX.IO Plus API Client component (TsgcWS_API_CexPlus). [+] : Added Coinbase API Client component (TsgcWS_API_Coinbase). [+] : Added Discord API Client component (TsgcWS_API_Discord). [+] : Added FXCM API Client component (TsgcWS_API_FXCM). [+] : Added Huobi API Client component (TsgcWS_API_Huobi) with spot and futures (TsgcWS_API_Huobi_Futures) support. [+] : Added Kraken API Client component (TsgcWS_API_Kraken) with spot and futures (TsgcWS_API_Kraken_Futures) support. [+] : Added Kucoin API Client component (TsgcWS_API_Kucoin) with spot and futures (TsgcWS_API_Kucoin_Futures) support. [+] : Added MEXC API Client component (TsgcWS_API_MEXC) with spot and futures (TsgcWS_API_MEXC_Futures) support. [+] : Added OKX API Client component (TsgcWS_API_OKX). [+] : Added OpenAI Realtime API Client component (TsgcWS_API_OpenAI). [+] : Added Pusher API Client component (TsgcWS_API_Pusher). [+] : Added SignalR API Client component (TsgcWS_API_SignalR). [+] : Added SignalR Core API Client component (TsgcWS_API_SignalRCore). [+] : Added 3Commas API Client component (TsgcWS_API_ThreeCommas). [+] : Added XTB API Client component (TsgcWS_API_XTB). [+] : Added WhatsApp Client component (TsgcWhatsApp_Client_Base) for WhatsApp Cloud API integration. [+] : Added RCON Client component (TsgcLib_RCON_Client) for remote console protocol. [+] : Added Amazon IoT Client component (TsgcIoT_Amazon_Client) with MQTT-based connectivity, SignatureV4, Custom Authentication and Certificate options. [+] : Added Azure IoT Client component (TsgcIoT_Azure_Client) with MQTT-based connectivity, SAS authentication, Device Twins, Direct Methods and Cloud-to-Device messaging. [+] : Added HTTP Web Push Client component (TsgcHTTP_WebPush_Client) with VAPID support for sending push notifications. [+] : Added WebPush Server API component (TsgcWSServer_API_WebPush). [+] : Added MCP (Model Context Protocol) Server API component (TsgcWSServer_API_MCP). [+] : New Anthropic Claude API: Added TsgcHTTP_API_Anthropic .NET wrapper with Messages (streaming), Vision, Tool Use, Extended Thinking, Documents, Citations, Web Search, MCP, Code Execution, Models, Token Counting, Files, and Message Batches APIs. [+] : Synchronized sgcWebSockets.cs DLL imports with all new sgcWebSockets.dll exports. [*] : Fixed AMQP 0.9.1: Parameter ordering, field-table encoding, spec-incorrect data types, missing channel IDs, read-loop data loss, and a thread-safety race condition. [*] : Fixed AMQP 1.0: Serialization errors, missing frame fields, multiple memory leaks, connection state handling, heartbeat activation, and thread safety. [*] : Fixed some minor memory leaks. 2026.2.0: 2026 February [+] : Added sgcWebSocket.module.js as an ES module version (thanks to Francesco for the file). [*] : Fixed Indy Server bug: Authentication was not working even though it was enabled. [*] : Fixed Indy Client bug: The ReadTimeOut property was not set properly when using TLS 1.3+ (thanks to Francesco for reporting it). 2026.1.0: 2026 January [*] : Fixed some minor bugs. 2025.10.0: 2025 November [*] : Fixed Bug MultipartFormData: when HTTPUploadFiles.RemoveBoundaries was true and the file size was zero, the file was created with the boundaries included. [*] : Fixed Bug Server: when KeepAlive property was active, the built-in javascript libraries return an error 404. [*] : Fixed Bug Server: when Authentication was not enabled, if the client send a request with an Authorization header, by default the connection was closed. [*] : Fixed Bug ServerSentEvents: when sending multiple messages the headers were included in the message. [*] : Fixed Bug ServerSentEvents: the initial message was sent twice. 2025.9.0: 2025 October [+] : Updated the Telegram libraries to the version 1.8.54. (Windows, Android, iOS, Linux64 and OSX). [+] : Updated sgcIndy to the latest version. [*] : Fixed Bug Telegram: the android64 library requires to be built with a 16KB page size from November 2025. [*] : Fixed Bug sgcIndy: the cipherlist is now set before loading the certificates to allow to set for example the security level. (Thanks to Preben for the fix) [*] : Fixed Bug OnHandshake event: UTF-8 characters were not encoded properly when adding new headers. [*] : Fixed Bug Indy Server: if Authentication.Basic was enabled, the server didn't return the Basic Realm when the Authentication header was wrong. 2025.8.0: 2025 September [*] : Fixed some minor bugs. 2025.7.0: 2025 August [+] : Updated the OpenSSL libraries to the version 3.5.1 [*] : Fixed Bug WhatsApp: when sending an url or path, the message was not decoded properly. [*] : Fixed Memory Leak MQTT Client. [*] : Fixed some minor bugs. 2025.6.0: 2025 June [*] : Fixed Bug internal method was calling OnMessage event instead of OnError. [*] : Fixed Bug sgcIndy: function RSA_set0_key, only is required for openssl 1.1+. [*] : Fixed Bug sgcIndy: if EVP_PKEY_base_id function is not available use the EVP_PKEY_is_a function instead. [*] : Fixed Bug Binance: the websocket messages were not processed. (Thanks to Alex for the fix). [*] : Fixed Bug Indy Server: if Authentication was enabled, if the HTTP Request hasn't any authentication, the connection was accepted although Authentication.AllowNonAuth was set to false. [*] : Fixed Bug JWT: some internal openssl objects were not properly destroyed after signing or validating. [*] : Fixed Bug JWT: error evaluating if the algorithms TIdHashSHA384 or TIdHashSHA512 were available. 2025.5.0: 2025 May [*] : Fixed in Server APIs: when http/2 was enabled, the response was empty. [*] : Fixed in Server APIs: when using more than one Server API only the last assigned API was working. [*] : Fixed Bug MQTT: When reading the MQTT 5 properties, if the size of the packet was 2 bytes or more, the message was not parsed successfully. [*] : Fixed Bug MQTT: When reading the Remaining Length of the packet, if was greater than 128, the message was not parsed successfully. 2025.4.0: 2025 April [*] : Fixed bug in OAuth2 Client: When changing the local server port, the old port was not removed from the bindings list. [*] : Fixed bug in MultipartFormData: When extracting files, the internal stream was not using UTF-8 encoding. [*] : Fixed bug in MQTT Client: memory leak if the component was destroyed before the event OnDisconnect was called. 2025.3.0: 2025 March [+] : Added support for .NET 9.0 [*] : Fixed Bug sgcIdSSLOpenSSLHeaders, the method X509_STORE_CTX_free was not properly defined. [*] : Fixed Bug sgcIdSSLOpenSSLHeader, the method ECDH_compute_key was not properly defined. 2025.2.0: 2025 February [+] : Improved Socket.IO Client, new property HandShakeAuthToken to set the authentication token when required. [+] : Improved Socket.IO sample, the previous online server has been closed and now has been replaced by a new one. [*] : Fixed Bug MQTT Client when using mqtt5 the payload had some invalid characters. [*] : Fixed Bug MQTT Client when the connection is over TCP a message received in multiple packets was not decoded properly. [*] : Fixed Bug Telegram Client reading the Sender User Id in a group. (Thanks to Michael for the fix). [*] : Fixed Bug HTTP2 Server, Authentication Basic was not working although it was enabled. 2025.1.0: 2025 January [*] : Improved RequestInfo class, added BodyAsText and BodyAsBase64 to read the content of a Post Request. [*] : Improved the performance of the WebSocket Extension PerMessage-Deflate. (Thanks to Michael for the patch). [*] : Fixed Bug TsgcWebSocketClient when using Connect, if the ConnectTimeout was greater than zero, it may appear a conflict. [*] : Fixed Bug HTTP/2 Client connecting using openssl 3.0 and tls 1.3. [*] : Fixed Bug OpenSSL when setting Version TLS 1.3 and MinVersion TLS 1.2, only TLS 1.2 was available. 2024.10.0: 2024 November [*] : Fixed Bug memory leak when receiving fragmented messages, the internal queue object was not destroyed (Thanks to Jasja for letting me know). [*] : Fixed Bug HTTP/2 client when using the HTTP Proxy the SNI host was not set properly and the connection was closed. [*] : Fixed Bug WebSocket client would enter a loop if it encountered a 10054 error while connecting. 2024.9.0: 2024 October [*] : Fixed Bug Indy Server when assigning a OpenSSL IOHandler that inherits from TIdServerIOHandlerSSLBase, the SSLOptions property was not found. (Thanks to Robert for letting me know). [*] : Fixed Bug Indy function TIdServerInterceptLogFileConnection.GetConnectionID when connection is not assigned. [*] : Fixed Bug Indy when getting the Certificate Signature and openSSL was greater than 1.1.1. [*] : Fixed Bug Indy when using openSSL API 3.0.0 (libraries < 3.2) and trying to load the private key with a password. 2024.8.0: 2024 September [*] : Fixed Bug Internal Compiler Directive replaced {IFDEF WINDOWS} by {IFDEF MSWINDOWS}. [*] : Fixed Bug Indy Server, when the property Specifications.RFC6455 was disabled, the TCP Connections where not accepted. [*] : Fixed Memory Leak using SChannel as IOHandler. (Thanks to Kenza for letting me know). [*] : Fixed Memory Leaks on Indy Server Component. 2024.7.0: 2024 August [+] : Improved OAuth2 Client, new grant type: auth2ResourceOwnerPassword which supports the Resource Owner Password Flow. [+] : Improved OpenSSL, the openSSL libraries for openSSL 3.3 have been compiled and are now available. [*] : Fixed Bug sgcIndy in the method X509_get_version when using openSSL 1.1.1 or 3.0.0. [*] : Fixed Bug sgcIndy "Error getting SSL method." [*] : Fixed Bug SChannel, Range Check Error may be rised in the method TSSLInfo.Read. [*] : Fixed Bug SChannel, if the connection wasn't closed gracefully, the event OnDisconnect was not called. [*] : Fixed Bug HeartBeat, when the type was hbtOnlyIfNoMsgRcvInterval, the event OnBeforeHeartBeat was called even if the ping was not sent. 2024.6.0: 2024 June [+] : Improved sgcIndy, added the latests X509 SSL Errors. [*] : Fixed Bug WriteAndWaitData method didn't exit if the connection was already disconnected and it was waiting till the end of the timeout. [*] : Fixed Bug Indy IOCP Server, when using plain TCP connection, the event OnTCPConnect was not called until some data was received. 2024.5.0: 2024 May [+] : Improved Binance API Client, NewOrder now supports trailing orders. [+] : Improved OAuth2 Server, new property OAuth2Options.PKCE (Proof Key for Code Exchange) which is an extension of the OAuth 2.0 protocol that helps prevent code interception attacks. [+] : Improved OAuth2 Client, new value "oauth2CodePKCE" in the property OAuth2Options.GrantType, which enables PKCE on client side. This option is usually used in native and mobile applications. [+] : Improved OAuth2 Client, when using "oauth2CodePKCE", set the LocalServerOptions.Port = 0 to use a random port when starting the local server. [*] : Fixed Bug Indy IOCP when trying to send a message and the connection was already closed. [*] : Fixed Bug Indy IOCP a potential deadlock while using the broadcast method. [*] : Fixed Bug Indy IOCP, socket error 10035 was not handled. 2024.4.0: 2024 April [*] : Fixed Bug HTTP/2 Client when closing connection, a thread exception may be raised. [*] : Fixed Bug HTTP/2 decoding the StreamIdentifier. [*] : Fixed Bug MQTT Client, when receiving disconnect message (mqtt5 only), the OnMQTTDisconnect event was called twice. [*] : Fixed Bug casting some internal variables with the wrong type. [*] : Fixed Bug Indy Server, the function to obtain the websocket sub-protocols supported hasn't a default value. 2024.3.0: 2024 March [+] : Updated the OpenSSL 1.1.1 libraries to the version 1.1.1w. This is the latest release for the Api 1.1.1. [+] : Updated the OpenSSL 3.0.0 libraries to the version 3.0.13. [+] : Updated the OpenSSL 3.1.0 libraries to the version 3.1.5. (These are currently the recommended openSSL libraries). [+] : Updated the OpenSSL 3.2.0 libraries to the version 3.2.1. [+] : Updated the Telegram libraries to the version 1.8.25. (Windows, Linux64 and OSX). [*] : Fixed Bug IOCP Indy Server, if there was an error while waiting for more data, the connection was not disconnected. [*] : Fixed Bug IOCP Indy Server, if the HeartBeat Timeout was exceeded, the connection was not disconnected. [*] : Fixed Bug IOCP Indy Server, if the message received was greater than the internal buffer, the connection was closed. [*] : Fixed Bug Disconnect exceptions were raised when writing binary data, but the RaiseDisconnectExceptions property was disabled. 2024.2.0: 2024 February [+] : Improved Binance API, added 1 second interval to KLine intervals. [+] : Improved openSSL error message, now if there is any error loading the openSSL library, the API version is shown. [+] : Improved TsgcWebSocketHttpServer, new property HttpOptions.PoolOfThreads, allows to handle the HTTP Requests in a pool of threads. [*] : Fixed Bug Disconnect exceptions were raised when writing the socket, but the RaiseDisconnectExceptions property was disabled. [*] : Fixed Bug when WatchDog.Monitor was enabled, the internal connection may not be destroyed properly. [*] : Fixed Bug removed the Critical Sections when reading SChannel Data because are not needed and slow down the write methods. [*] : Fixed Bug sgcWebSockets.js conflict with jquery with the event function. The Event function has been renamed to sgcCustomEvent. 2024.1.0: 2024 January [+] : Added support for .NET 8.0 [+] : Added the Ping method to the WebSocket Server component. [*] : Fixed Bug when Compression and Fragmented messages were activated, the fragmented message was not compressed. [*] : Fixed Bug HTTP/2 Indy Server, validating the stream identifiers must only be done in the headers or push-promise frames. [*] : Fixed Bug HTTP/2 Indy Server, more data frames were sent than the receive windows frames allowed. [*] : Fixed Bug Memory Leak when the Indy Server was using IOCP as IOHandler. 2023.8.0: 2023 November [+] : Updated the Indy version to the latest. [+] : Improved Indy Servers, there is a new property "OpenSSL_Options.CurveList", which allows to set the curve list names for the openSSL library. [+] : Improved HTTP Forwarding to handle the 302 response code. [*] : Fixed Bug OAuth2 Server, when client-secret is not valid, the server returned the correct value in the error message (Thanks to Jan to let me know). [*] : Fixed Bug when using OnBeforeForwardHTTP event, the forward value was not cleared for every new request. [*] : Fixed Bug Indy Server, when stopping the server an access violation may raise if the internal Scheduler is not assigned. (Thanks to Francesco to let me know). [*] : Fixed Bug Indy Server, when stopping the server, the internal SSL Handler was not destroyed. [*] : Fixed Bug Indy Server, authentication basic was failing to catch the authorization header. (Thanks to Francesco to let me know). [*] : Fixed Bug Server HTTP/2 protocol, ContentText was not preserving the correct charset. (Thanks to Francesco to let me know). [*] : Fixed Bug Server Components when Extensions.PerMessage_Deflate was enabled and Options.FragmentedMessages = frgAll, the message was uncompressed 2 times. 2023.7.0: 2023 September [*] : Fixed Bug HTTP/2 Server, Range Check Error. [*] : Fixed Bug HTTP/2 protocol, error decoding empty string. [*] : Fixed Bug SChannel error "invalid pointer" when using Start/Stop threaded methods. 2023.6.0: 2023 August [*] : Fixed Bug OAuth2 Server, the url parameters were not decoded. 2023.5.0: 2023 June [*] : Fixed Bug Indy EPOLL Server, Deadlock while stopping the server on Linux64. [*] : Fixed Bug EPOLL Server, the OnDisconnect event was not called in some cases (Thanks to Andrea for the fix). [*] : Fixed Bug IOCP Server, the OnDisconnect event was not called in some cases (Thanks to Andrea for the fix). [*] : Fixed Bug IOCP Server, using SSL connections, some internal events were not linked properly. 2023.4.0: 2023 May [+] : Added TsgcWSConnectionServer.HeadersRequest property to get the HandShake sent by the client. [+] : Improved OAuth2 Server, there is a new event "OnOAuth2Unauthorized" which is called when a request is not authorized and will be disconnected here you can configure which endpoints require OAuth2 Authentication and which not. [+] : Improved JWT Server, there is a new event "OnJWTUnauthorized" which is called when a request is not authorized and will be disconnected, here you can configure which endpoints require JWT Authentication and which not. [+] : Improved HTTP Server, new method ProcessPostStream, call this method inside OnCommandGet if you want to process the file uploaded before send a response to the peer. [*] : Fixed Bug TsgcWebSocketServer, if a connection is closed with an error 10053 while is writing data, the thread freezes trying to closing the socket again. [*] : Fixed Bug TsgcWebSocketServer, if server receives an OPTIONS request while the Basic Authentication is enabled, the Server must not return a realm. Now the request is handled in the OnCommandOther event. [*] : Fixed Bug TsgcWSConnection.HeadersResponse, the value was not decoded properly. [*] : Fixed Bug OnHandshake event, the Headers modifications were not sent to the server. 2023.3.0: 2023 April [+] : Added support for .NET 7.0 [+] : Added Support for Linux64. [*] : Fixed Bug SChannel, the SSL Parameter parameter from CredentialsCallBack was not called properly. (Thanks to Stefan to let me know). [*] : Fixed Bug IOCP IOHandler, invalid pointer when destroying the internal connection. [*] : Fixed Bug Range Check Error using SChannel as TLS Provider. [*] : Fixed Bug OAuth2 Server processing the Token request, the server returns in some cases invalid_request. [*] : Fixed Bug TsgcWebSocketClient, Stop and Disconnect methods were not properly called. [*] : Fixed Bug WebSocket and Server clients, the event OnHandshake was not raised. 2023.2.0: 2023 February [*] : Fixed Bug MQTT Demo, publish method took the channel name from the subscribing channel textbox instead of the publishing channel textbox. [*] : Fixed Bug when connection was closed pending asynchronous messages were not removed from internal queue. (Thanks to Martijn to let me know). [*] : Fixed Bug Binance, added millisecond resolution to the timestamp signature field. (Thanks to Gorazd to let me know). [*] : Fixed Bug Binance Futures connecting to user data stream. 2023.1.0: 2023 January [+] : Updated Telegram libraries to version 1.8.9. [+] : Improved Telegram Client, when there is an error while loading the library on MacOS, now the error message with the reason is caught. [+] : Improved Indy Server, new property SSLOptions.OpenSSL_Options.CipherList to customize the Cipher List. [*] : Fixed Bug IOCP IOHandler and SSL, if there was an error while writing data, the connection was not closed. [*] : Fixed Bug Indy server, error: list index out of bounds while handling heartbeat timeout. [*] : Fixed Bug Telegram Client, error loading library on OSX64. [*] : Fixed Bug WebSocket Server when Basic Authorization was enabled, when a request has not authorization or it was wrong, the server disconnected the connection without asking the realm. 2022.10.0: 2022 December [+] : Improved WhatsApp API to version 15.0. [+] : Improved WhatsApp API, new method "UploadMedia" to upload images, documents... to whatsapp servers. [+] : Improved RTCMultiConnection API, updated to the latest socket.io version. [+] : Improved WebRTC Server API, new property "CloseSessionOnHangup", if disabled, when a peer close a session, the other peer is not disconnected (by default is true). [*] : Fixed Bug SChannel Win64, access violation while starting ssl connection. (Thanks to Anders to let me know). [*] : Fixed Bug RTCMultiConnection Screen Sharing Demo, the connection may fail in some cases. [*] : Fixed Bug IOCP IOHandler, on heartbeat timeout exceeded, the connection was not closed. 2022.9.0: 2022 November [+] : Improved IOCP on Windows Indy Servers (WebSocket and HTTPs Servers). The IOHandler has been rewritten from scratch and performance has been optimized. [+] : Improved SChannel IOHandler, now implements SCH_CREDENTIALS instead of the deprecated SCHANNEL_CRED. [*] : Fixed Bug JWT, access violation on ES Algorithm when using openSSL 1.1 or 3.0. 2022.8.0: 2022 October [+] : Improved Server, there is a new property SSLOptions.VerifyCertificate_Options with 2 new options: FailIfNoCertificate (if the client doesn't provide a certificate the connection is closed) and VerifyClientOnce. [*] : Fixed Bug TURN Server, STUN binding requests were not relayed to the correct ip address. [*] : Fixed Bug TsgcWebSocketClient, when watchdog use Start method to reconnect it may occur in the middle of another reconnection, creating more than 1 thread trying to reconnect. [*] : Fixed Bug using HTTPUploadFiles, when receiving a filename with extended UTF8 characters, the filename was not decoded properly. 2022.7.0: 2022 September [+] : Improved WhatsApp API, added new methods to Send Local Files as a Message: SendFileDocument, SendFileImage, SendFileVideo... [+] : Improved WhatsApp API, new event OnBeforeSendMessage, this event is called before the message is sent to WhatsApp and allows to read/update the message in JSON format. [+] : Improved WhatsApp API, new method DownloadMedia to download media given an object id. [*] : Fixed Bug List Index out of Bounds accessing to count property of internal queue. [*] : Fixed Bug deleting websocket ping from internal queue after receiving a pong. 2022.6.0: 2022 July [+] : New WhatsApp Client, allows to send and receive messages, documents, images... using Whatsapp Cloud API. [+] : New WhatsApp Demo, shows how works the WhatsApp Cloud API: send messages, receive notifications... [*] : Fixed Bug sending Big Files through HTTP Protocol, out of memory error. [*] : Fixed Bug MQTT Client, Range Check Error while reading a published message. [*] : Fixed Bug when HTTPUploadFiles was enabled, the file received has 2 extra bytes. (Thanks to Allen to let me know). [*] : Fixed MemoryLeak when HTTPUploadFiles was enabled. [*] : Fixed Bug Socket.IO, the path was set after the /socket.io 2022.5.0: 2022 June [*] : Fixed Bug Numeric Overflow connecting to a MQTT 5.0 server. [*] : Fixed Bug RangeCheck error. [*] : Fixed Memory Leak TsgcUDPCLient and TsgcUDPServer, the property TLSOptions was not destroyed. [*] : Fixed Memory Leak TsgcSTUNClient, internal TCP client was not destroyed. [*] : Fixed Bug connecting to Socket.IO 4 Server. 2022.4.0: 2022 April [+] : ZLib has been updated to 1.2.12, includes the latest security fix (*only Enterprise Edition). [+] : New Event on Server components "OnHTTPUploadReadInput" to read the Input Values when a file is received. [*] : Fixed Bug Binance Client, the method "UnSubscribeKLine" didn't stop receiving KLine updates. [*] : Fixed Bug OAuth2 Client, after receiving a successful Access Token, sometimes a favicon request was processed as invalid. [*] : Fixed Bug using openSSL 3.0, access violation calling a deprecated method when an internal error occurs. 2022.3.0: 2022 March [+] : Improved Telegram API, updated to 1.8.1 version. [+] : Improved Telegram API, added support for Sponsored Messages. New method "getChatSponsoredMessage" to retrieve sponsored messages, the messages will be notified "OnMessageSponsored" event. [+] : Improved Telegram API, from 1.7.0 the sender_user_id is zero, there are 2 new objects to read the sender of the message: SenderChat and SenderUser. [+] : Improved Telegram API, new method SendInvoiceMessage allows bots to send invoice messages. [*] : Fixed Bug Sending HTTP/2 Response from server, the content was empty. 2022.2.0: 2022 February [+] : Added support for .NET 6.0 [*] : Fixed Bug Reading HTTP/2 StreamDependency as 31 bit value. [*] : Fixed Bug some compiler defines for OpenSSL 1.1 and 3.0 were not defined properly. [*] : Fixed Bug HTTP/2 and Firefox, an internal error closed the connection. [*] : Fixed Bug TsgcWebSocketClient, after calling TsgcWSConnection.Close, the OnDisconnect event was not fired. 2022.1.0: 2022 January [+] : Improved WebRTC Protocol, new property "WebRTC.IceServers" which allows to configure custom ICE Servers. [+] : Improved Telegram Client, Sending a message has a new parameter to send buttons requesting the phone number, location... (for bots only). [+] : Updated Telegram Libraries to 1.7.9 version to fix the error UPDATE_APP_TO_LOGIN when the user login using a phone. [+] : Improved Binance Client, now supports Binance.US API (WebSocket and REST APIs). [+] : Improved Binance Client, new property "Binance.ListenKeyOnDisconnect" allows to define if the ListenKey is deleted when client disconnects or not. [+] : Improved Binance Client, new property "Binance.UseCombinedStreams" if enabled, events are wrapped as follows: {"stream":"","data":}. [+] : Improved PDF Documentation: support for syntax highlighting, image compression, automatic hyphenation, embeded fonts and more. [+] : Improved HTML Help Documentation, now supports syntax highlighting. [*] : Fixed Bug using JWT CLient and openSSL 1.1 libraries. [*] : Fixed Bug Binance always make use of openSSL 1.0.2 instead of taking the configuration of TsgcWebSocketClient. [*] : Fixed Bug WebRTC Protocol, when a user disconnect from a channel other channels may be disconnected too. [*] : Fixed Bug MQTT Client when writing/reading had a high load of messages, the message may become corrupted in some cases. [*] : Fixed Bug Binance, if the event OnHTTPException wasn't handled, the exceptions weren't shown to the user. [*] : Fixed Bug WebSocket Server sending fragmented messages when compression was enabled. [*] : Fixed Bug when PerMessage_Deflate was enabled, while reading a compressed message, Z_BUF_ERROR may close the connection. [*] : Fixed Bug TsgcWebSocketClient, OnDisconnect event may not be called in some special cases. [*] : Fixed Bug WebSocket Server, if the property Active was set to True, when the server was already started, an access violation was raised. 4.5.4: 2021 November [+] : Added support for MacOS 64bits. [+] : Added support for nuget packages. [+] : Improved TLSOptions.Version property, now if the value is tlsUndefined (the default), the client will try to negotiate all possible TLS versions (from TLS 1.3 to TLS 1.0), before this change the TLS 1.0 was selected. [+] : Improved HTTPUploadFiles, now there are 2 new events: OnHTTPUploadBeforeSaveFile and OnHTTPUploadAfterSaveFile, allowing to know/modify the name of the file received. [+] : Improved openSSL configuration, if openSSL_Options.LibPath = oslpCustomPath then will set the openSSL libraries location to the value of OpenSSL_Options.LibPathCustom (Thanks to Matteo for the suggestion). [+] : Improved openSSL configuration, new property UnixSymLinks allows to disable the loading of SymLinks under Unix. Fixes the error "Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI." under MacOS Monterey. [+] : Improved openSSL error message "cannot load opensssl", now shows the path, methods not available and version. [+] : Improved Socket.IO API, added support for latest API 4. [*] : Fixed Bug Indy Servers, in some cases half-disconnected http connections may make use of the full cpu. (Thanks to Moacir to let me know). [*] : Fixed Bug when PerMessage_Deflate, handling a Z_BUF_ERROR message. [*] : Fixed Bug when PerMessage_Deflate, if an empty string or memory stream was sent, an error was raised. [*] : Fixed Bug when PerMessage_Deflate, if there was an internal error while inflating or deflating, the error message was not passed to the exception. [*] : Fixed Bug when PerMessage_Deflate, when inflating a stream, if the buffer wasn't big enough, the stream wasn't fully compressed. [*] : Fixed Bug TsgcWebSocketClient using plain TCP Protocol and TLS 1.3, the connection locks the thread during some seconds. [*] : Fixed Bug when the property HTTPUploadFiles.RemoveBoundaries was enabled, the filename were not extracted on older Delphi versions. [*] : Fixed Bug when the property HTTPUploadFiles.RemoveBoundaries was enabled, if the filename had spaces, the filename was not extracted completely. [*] : Fixed Bug MQTT Client read/write VarInteger values. [*] : Fixed Bug MQTT Client when publishing a message with PublishProperties, always sent the property TopicAlias = 1. [/] : The property TsgcWebSocketClient.Active now returns if the internal connection is Assigned or not. Before that, it called the Connected function of TCP Client. 4.5.3: 2021 October [+] : Added support for OpenSSL 3.0.0 [+] : New Component TsgcSTUNServer, implements the STUN Server Protocol providing a service to discover the mapped IP Address and port number. [+] : New Component TsgcSTUNClient, implements the STUN Client Protocol. [+] : New Demo which shows how use STUN Server and Client. [+] : New Component TsgcTURNServer, implements the STUN/TURN Server Protocol. [+] : New Component TsgcTURNClient, implements the STUN/TURN Client Protocol. [+] : New Demo which shows how use TURN Server and Client. [+] : New Component TsgcWSAPIServer_RTCMultiConnection, server implementation of RTCMultiConnection project based on WebRTC which allows: MultiVideoConferences, Screen Sharing and Video Broadcasting. [+] : New Demo RTCMultiConnection in "30.WebRTC_Protocol\04.RTCMultiConnection" which shows how to use the TsgcWSAPIServer_RTCMultiConnection component. [+] : New Component TsgcWSAPI_Binance, supports Binance Stock API: - WebSocket API - User Stream API - REST API [+] : New Component TsgcWSAPI_Binance_Futures, supports Binance Futures API: - WebSocket API - User Stream API - REST API [+] : Improved Demo "Client", a new Tab has been added to show how the Binance API works. [*] : Fixed Bug SChannel, memory was modified after the object was destroyed. (Thanks to Anders to let me know). [*] : Fixed some SChannel Memory Leaks when destroying TsgcWebSocketClient. [*] : Fixed Bug TsgcWebSocketClient, Thread-lock when openSSL = TLS1.3 and immediately after setting Active := True, the property Active was evaluated. 4.5.2: 2021 September [*] : Fixed Bug TsgcWebSocketClient when running in a secondary thread and using openSSL libraries. [*] : Fixed Memory Leak on TsgcWebSocketHTTPServer when sending the HTTP response as a Binary object. [*] : Fixed Memory Leak using IOCP on Indy WebSocket Server. (Thanks to Anders let me know). 4.5.1: 2021 July [+] : Improved SChannel, new property "CipherList" in TLSOptions.SChannel_Options, which allows to set the cipher list used to connect to a secure server. Example: CALG_AES_256:CALG_AES_128 [+] : Improved TsgcWebSocketClient, WebSocket redirections are now supported by websocket client. [*] : Fixed Bug MQTT Protocol and WatchDog.Attempts > 0, after a reconnection, the internal Attempts count value was not cleared. [*] : Fixed Bug MQTT Protocol, when QoS = mtqsExactlyOnce, after receiving a PubRel message, the PubComp reply was not sent. [*] : Fixed Bug MQTT Protocol, when QoS = mtqsExactlyOnce, the stored message was not deleted when PUBCOMP message was received. [*] : Fixed Bug OnException event when notifyEvents = neAsynchronous, in some cases the Exception parameter was already destroyed. [*] : Fixed Bug WebRTC wasn't working using HTTP/2 as protocol. [*] : Fixed Bug WatchDog, if the client was disconnected and set Active = False, the watchdog never stops if WatchDog.Attempts = 0. [*] : Fixed Bug Clearing internal Ping List, an access violation can happen in some cases. 4.5.0: 2021 June [+] : New property "BoundPortMin" and "BoundPortMax" in TsgcWebSocketClient, allows to set the min and max local port used by websocket client. [+] : New property "LingerState" in TsgcWebSocketClient, allows to reset a socket connection where LingerState = 0. By default the value is -1, which means the connection will be closed gracefully. [+] : Improved OAuth2 Server, new method "AddToken" allows to recover issued tokens when the OAuth2 server is restarted. [*] : Fixed Bug Server Component, the count property was not defined. [*] : Fixed Bug UTF-8 messages. [*] : Fixed Bug Demo Chat, authentication was not properly initialized. [*] : Fixed Bug Authentication.User property was not properly initialized. [*] : Fixed Bug when TsgcWebSocketClient has attached some API, if the OnDisconnect internal event had an exception while processing, the event was not called. [*] : Fixed Bug Telegram API when Document.FileName has utf-8 characters. 4.4.9: 2021 May [+] : Added support for .NET 5 and .NET Core 5.0 [+] : New Component TsgcHTTP_JWT_Client, allows to encode and sign JWT Tokens as Authentication Bearers in WebSocket Client Component. [+] : New Component TsgcHTTP_JWT_Server, allows to decode and validate JWT Tokens as Authentication Bearers in HTTP and WebSocket Server Components. [+] : New property "HttpUploadFiles" in HTTP Server. Allows to save the POST streams received as FileStreams so server can receive big files without getting out of memory exception. [+] : New Demo that shows how POST big Files and store in a file instead of memory using WebSocket HTTP Server. [+] : Improved OAuth2 Client, now supports OAuth2 Client Credentials (for applications like daemons or service accounts). There is a new property called GrantType with the following values (auth2Code, auth2ClientCredentials). [+] : Improved OAuth2 Client Demo, new Configuration "Azure AD As Service" showing the use of new Client Credentials grant type. [+] : Improved OpenSSL_Options property, new property "LibPath", if has the value "oslpDefaultFolder" automatically calls IdOpenSSLSetLibPath and sets the default lib folder. [+] : Update OpenSSL libraries 1.1.1 to latest version. [*] : Fixed Bug HTTP/2 Server sending Windows Update Frame. [*] : Fixed Bug OAuth2 Client error opening WebBrowser under MacOSX. [*] : Fixed Bug SChannel if no certificate was found by issuer, the connection was closed. [*] : Fixed Bug TsgcWebSocketServer and TsgcWebSocketHTTPServer, if authentication was enabled an access violation was raised processing any request. 4.4.8: 2021 April [+] : New Component TsgcWSPClient_Files, c# client protocol that allows to send/receive files to/from the server. [+] : New Component TsgcWSPServer_Files, c# server protocol that allows to send/received files to/from the clients. [+] : New Demo Files which shows the main features of Files Protocol. [+] : Improved LogFile in WebSocket Server and Client components, now websocket messages are logged unmasked. [+] : Improved Telegram API, new Methods: GetBasicGroupFullInfo, GetSupergroupMembers and GetChatMember, allow to get members information of Basic and Super groups. [+] : Improved TsgcWebSocketHTTPServer, new property "Charset" where you can set the default Charset of DocumentRoot files served. [+] : Improved SSLOptions.OpenSSL_Options.ECDHE property of WebSocket Server, now if enabled adds a secure cipherlist for TLS 1.2. [*] : Fixed Bug TLS 1.3 and OpenSSL 1.1.1, by default set the minimum protocol to TLS 1.0 instead of TLS 1.2 4.4.7: 2021 February [+] : Improved WebSocket Client, new event "OnBeforeConnect" this method is called before the client tries to connect to server. [+] : Improved WebSocket Client, new event "OnBeforeWatchDog" allows to customize the Client before the client tries to reconnect to server. [+] : Improved TsgcWebSocketHTTPServer, new property HTTP2Options.AltSvc, if enabled informs to client that HTTP/2 is supported by server. [+] : Improved OAuth2 Client, LocalServer supports SSL/TLS connections. [+] : Improved Telegram client, new method SendRichTextMessage with support for bold, italic, underline, strike and code formats. [+] : Improved Telegram client, new method GetChat which allows to get the data of a single chat (supported by user and bots). [+] : Improved Socket.IO API Client, added support for Socket.IO 3.* API. [+] : Improved SChannel, now supports the use of Certificates: using a Certificate in PFX format or a Certificate Hash thumbprint. [*] : Fixed Bug using SChannel as IOHandler and connecting through a Proxy Server. (Thanks to Anders to let me know). [*] : Fixed Bug TsgcWebSocketClient getting the Active property value was sometimes slow or locked. [*] : Fixed Bug TsgcWebSocketClient ProxySocks connect directly to server instead of use Proxy Server. [*] : Fixed Bug TsgcWebSocketHTTPServer, DocumentRoot wasn't working when using HTTP/2 protocol. 4.4.6: 2021 January [+] : New Event OnBeforeForwardHTTP on Server Components, allows to forward an HTTP request to another server. (Thanks to Olaf for his suggestion). [+] : New Event OnAfterForwardHTTP on Server Components, allows to know the response from HTTP Forwarded Request. [+] : Improved TsgcWebSocketHTTPServer, now has support for HTTP/2 Server Push using PushPromiseAddPreLoadLinks method to configure the push promise files. [+] : Improved TsgcWebSocketHTTPServer, added support for HTTP/2 cookies. [+] : Improved TsgcWebSocketHTTPServer, new Property HTTP2Options.Events, configures if Connect/Disconnect events are called under HTTP/2 protocol (by default are disabled). [+] : Improved Telegram API, send bot messages with buttons (Callback and Url) is now supported. [+] : Improved Telegram API, a new event "OnNewCallbackQuery" has been added, allows to process which buttons have selected the users. [+] : Improved MQTT client, HeartBeat now supports Timeout, if after x time the client doesn't receive a response to the ping previously sent, it closes the connection automatically. [*] : Fixed Bug in Indy Servers, the ReadTimeOut value was not used after read socket data to check if there was more data to process. [*] : Fixed Bug Basic Authorization was not read under HTTP/2 protocol if Authentication was not enabled. [*] : Fixed Bug Server HTTP/2 Protocol reading a Window_Update while Header Frame was not already processed. [*] : Fixed Bug HTTP/2 Protocol, connection window update was not updated and an error was raised closing connection. [*] : Fixed Bug HTTP/2 Protocol decoding latest header of Static table. [*] : Fixed Bug HTTP/2 Protocol receiving unexpected stream identifier in client component. [*] : Fixed Bug TsgcWebSocketClient if Options.CleanDisconnect = True and there was an error sending the close message, the disconnect event wasn't called. [*] : Fixed Bug TsgcWebSocketClient, avoid potential thread-lock when reconnecting to server if notifyEvents = neNoSync. (Thanks to Stefan to let me know). [*] : Fixed Bug TsgcWebSocketClient, avoid potential call to OnDisconnect event twice. [*] : Fixed Bug Memory Leak on Telegram Client. [*] : Fixed Bug LogFile of TsgcWebSocketClient wasn't thread safe. (Thanks to Eddy to let me know). [*] : Fixed Bug TsgcWebSocketClient using TLS 1.3 sometimes an error was raised when connecting to server. 4.4.5: 2020 December [+] : New Component TsgcHTTP_OAuth2_Server, server implementation of OAuth2 protocol, allows to Authorize and Issue Access Tokens to OAuth2 clients. [+] : New Component TsgcHTTP_OAuth2_Client, this protocol allows third-party applications to grant limited access to an HTTP service, either on behalf of a resource owner or by allowing the third-party application to obtain access on its own behalf. [+] : New Demo which shows how use OAuth2 on Server and Client Components. [*] : Fixed Bug Invalid Pointer when NotifyEvents = neAsynchronous and CheckSynchronize was called while the event was processing. (Thanks to Dirk to let me know) [*] : Fixed Bug Processing Fragmented Messages, first fragmented was overwrited when second fragment arrived. (Thanks to Patrik to let me know) [*] : Fixed Bug TsgcWebSocketClient when there was a disconnection, internal threads were stopped, but this method was called several times in some cases. [*] : FIxed Bug potential Thread-Lock when NotifyEvents = neAsynchronous, connection was disconnected and there were messages pending to be processed. [*] : Fixed Bug Access Violation error executing method "Start" when Client/Server was already destroyed. [*] : Fixed Bug Telegram Client, the read thread didn't start after connect to telegram servers. [*] : Fixed Bug Telegram Client, the Title of the chat message wasn't properly decoded. (Thanks to Hyeonwoo to let me know). [*] : Fixed Bug Indy Servers, if connection was already closed but Buffer had still data to process, the thread never ends and make use of full cpu. [*] : Fixed Bug in TsgcWSAPI_SocketIO component when initializing connection and ioAPI0 is selected as API (Thanks to Jean to let me know). [*] : Fixed Bug connecting when WriteTimeOut > 0 on none Windows OS, now this property only applies to Windows. 4.4.4: 2020 November [+] : New method "PublishAndWait" in MQTT Client, this method allow to publish a message using mtqsAtLeastOnce or mtqsExactlyOnce and wait till message is processed by server. [+] : Improved HTTP/2 Server, ping and heartbeat are now supported. [+] : Improved Telegram Client, added support for proxies: HTTP, MTProto and Socks5. New methods to Add Proxies, Remove, Enable, Disable... [+] : New method "Restart" in Server Components, restart the server in a secondary thread. [+] : Improved WatchDog on Server components, a new property called Monitor, if enabled, a client will try to connect to server, if fails after the TimeOut set, the server is restarted automatically. [*] : Fixed Bug TsgcWebSocketClient and TLSOptions.IOHandler = iohSChannel, when closing connection an exception 10004 was shown. [*] : Fixed Bug TsgcWebSocketClient and TLSOptions.IOHandler = iohSChannel, when destroying TsgcWebSocketClient if connection was active, a thread-lock occurs. [*] : Fixed Bug Server connections wasn't closed if OriginsAllowed not match the websocket origin client. [*] : Fixed Bug ServerSentEvent javascript code, contains invalid text. [*] : Fixed Bug HeartBeat, if there was an exception sending a ping, exception was not captured and was shown to user. [*] : Fixed Bug MQTT Client, if there was an exception while resending a message with Qos <> mtqsAtLeastOnce, exception was not captured and was shown to user. [*] : Fixed Bug MQTT Client, when publishing a Stream with Qos <> mtqsAtLeastOnce and not received an acknowledgment from server before timeout, when resend the message, payload was empty. [*] : Fixed Bug HTTP/2 Server, if SETTINGS_INITIAL_WINDOW_SIZE was changed after HEADERS, the WindowSize was not adjusted properly. [*] : Fixed Bug WatchDog on Server Components, if the server was stopped manually, the WatchDog try to start server again instead of stop. 4.4.3: 2020 October [+] : Initial support for HTTP/2 in TsgcWebSocketHTTPServer - New property HTTP2Options: allows to enable HTTP/2 protocol and configure initial settings. [+] : New Event OnBeforeHeartBeat on Client and Server components, allows to customize HeartBeat behaviour. [*] : Fixed Access Violation TsgcWebSocketClient when TLS is enabled reading bytes from socket. [*] : Fixed Access Violation when WebSocket server uses SSL and is disconnecting. [*] : Fixed Bug Socket.IO, connection was closed by a HeartBeat timeout. [*] : Fixed Bug Reading Compressed Frame when Compression was enabled. [*] : Improved Memory Usage when Compression is enabled. [*] : Fixed Bug setting the value of ResponseInfo.ContentType 4.4.2: 2020 September [+] : New Component TsgcWSAPI_SocketIO. Socket.IO Client for Windows32 and Windows64 which allows to connect to Socket.IO Servers. [*] : Fixed MemoryLeak using ALPN protocol. 4.4.1: 2020 July [+] : New Component TsgcTDLib_Telegram. Telegram Client for Windows32 and Windows64 which allows to send/receive text messages, files, photos... and more. [+] : New property "DatabaseDirectory" in Telegram Client. Allows to set the directory where is the TDLib database. [+] : Improved Telegram Demo to ask user for a password if telegram component requires it. [+] : Improved speed reading websocket data applies to server and client components. [+] : New Property TimeOut in Indy IOCP Server, allows to set the max timeout closing server threads. [+] : Updated OpenSSL Custom Indy, added X509_verify_cert_error_string to be able to retrieve cert error. (Thanks to S�bastien for his patch). [+] : Added support for ALPN (Application-Layer Protocol Negotiation) when SChannel is set in TsgcWebSocketClient. [*] : Fixed Bug MQTT 5.0 API reading PubACK, PubREC, PubREL, PubCOMP Properties. [*] : Fixed Bug MQTT 5.0 Calling publish method and passing properties as parameter. [*] : Fixed Bug Indy Server + IOCP, access violation closing connection. [*] : Fixed Bug Indy Server + IOCP, exception "connection closed gracefully" was showed to end-user. [*] : Fixed Bug Indy Server + IOCP, memory leaks have been removed. [*] : Fixed Bug TsgcWebSocketClient.Connect, if remote peer was not available, an exception was raised. [*] : Fixed Bug MQTT Client Protocol, when watchdog is enabled and Attempts value is greater than zero, client was trying to reconnect more times than the attempts value. [*] : Fixed Bug OpenSSL Custom Indy, for openssl 1.1.1 use EVP_MD_CTX_new and EVP_MD_CTX_free. (Thanks to S�bastien for his patch). [*] : Fixed Bug OpenSSL Custom Indy, changed wrong name for sk_pop_free and added some functions available for static linking. (Thanks to S�bastien for his patch). [*] : Fixed Bug TsgcWebSocketClient when Server sends a Sub-protocol which client has not requested. [*] : Fixed Bug Thread Lock while Client Disconnecting when TLS is enabled with latest Indy version. 4.4.0: 2020 June [+] : New Component TsgcWSProtocol_MQTT_Client. MQTT Client to connect to MQTT 3.1.1 and 5.0 Servers. [+] : Update Demo: Client. Now has a new Tab which shows how connect to MQTT Servers. [+] : New Component TsgcWSProtocol_WebRTC_Server. Open Source Project that enables web browsers with Real-Time Communications (RTC). [+] : New Demo: WebRTC [+] : New Component TsgcWSProtocol_AppRTC_Server. Is a WebRTC server using AppRTC Demo code. [+] : New Demo: AppRTC [+] : New Property TLSOptions.VerifyDepth for Server and Client components, is the maximum number of intermediate certificate issuers (default value is zero). [+] : New Method WebSocketClient, UnRegisterProtocol. Allows to unregister a protocol previously registered. [+] : New Coturn server is now provided as a compiled console application for windows. Coturn is a STUN/TURN server for WebRTC protocol. [+] : Improved Ping method, if ping is called manually, now you can pass the string of the ping message. [+] : Improved Server Plain TCP Connections, if HeartBeat is enabled, it will send a message to maintain connection. [+] : New Event OnTCPConnect in Indy Server, this event is called after a TCP Connection and before WebSocket HandShake. 4.3.7: 2020 May [+] : sgcWebSockets library supports .NET for win32 and win64. [+] : New Component TsgcWebSocketServer. [+] : New Component TsgcWebSocketHTTPServer. [+] : New Component TsgcWebSocketClient. [+] : New Demo: Chat [+] : New Demo: Client [+] : New Demo: Snapshots [+] : New Demo: Authentication [+] : New Demo: KendoUI_Grid [+] : New Demo: Monitor [+] : New Demo: ServerSentEvents [+] : New Demo: UploadFile [+] : Added support for .NET 2.0, .NET 3.5, .NET 4.0, .NET 4.5 [+] : Added support for .NET Standard 1.6, .NET Standard 2.0 [+] : Added support for .NET [+] : Added VSIX Package for .NET 4.5 Winforms.