.NET WebSocket Client
TsgcWebSocketClient for .NET — cross-platform WebSocket client supporting .NET Framework 2.0+, .NET Core, .NET 5–9, and .NET Standard. Runs on Windows, Linux, and macOS.
TsgcWebSocketClient for .NET — cross-platform WebSocket client supporting .NET Framework 2.0+, .NET Core, .NET 5–9, and .NET Standard. Runs on Windows, Linux, and macOS.
C# / .NET port of TsgcWebSocketClient. Same property surface, same events, same class name — published under esegece.sgcWebSockets.
TsgcWebSocketClient
WebSocket — RFC 6455
.NET Framework 2.0–4.8, .NET Core 1.0–3.1, .NET 5–9, .NET Standard 1.6 / 2.0
Standard / Professional / Enterprise
The same Host/Port/TLS/OnMessage surface as the Delphi component, idiomatic C#.
using esegece.sgcWebSockets;
var client = new TsgcWebSocketClient();
client.Host = "127.0.0.1";
client.Port = 80;
client.TLS = true;
client.Options.Parameters = "/ws/";
client.OnConnect += (conn) => Console.WriteLine("#connected: " + conn.IP);
client.OnDisconnect += (conn, code) => Console.WriteLine("#disconnected: " + code);
client.OnMessage += (conn, text) => Console.WriteLine(text);
client.OnException += (conn, ex) => Console.WriteLine("#exception: " + ex.Message);
client.Active = true;
client.WriteData("hello");
23 published properties, 8 methods, 16 events — pulled from the component reference.
Published properties: Active, Host, Port.
Published properties: QueueOptions.
Published properties: HeartBeat, WatchDog.
Published properties: Proxy, Authentication, TLSOptions.
Events: OnConnect, OnDisconnect, OnError.
Events: OnMessage, OnBinary, OnFragmented.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — TsgcWebSocketClient Full property, method and event reference for this component. | Open | |
| Demo Project — Demos\NET\WebSocket Client Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi, C++ Builder and .NET and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |