.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 (.NET)

C# / .NET port of TsgcWebSocketClient. Same property surface, same events, same class name — published under esegece.sgcWebSockets.

Klasa komponentu

TsgcWebSocketClient

Protokół

WebSocket — RFC 6455

Platformy

.NET Framework 2.0–4.8, .NET Core 1.0–3.1, .NET 5–9, .NET Standard 1.6 / 2.0

Edycja

Standard / Professional / Enterprise

Drop the component, set a few properties, go

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");

Co jest w środku

23 published properties, 8 methods, 16 events — pulled from the component reference.

Connection

Published properties: Active, Host, Port.

Messaging

Published properties: QueueOptions.

Reliability

Published properties: HeartBeat, WatchDog.

Security

Published properties: Proxy, Authentication, TLSOptions.

Lifecycle

Events: OnConnect, OnDisconnect, OnError.

Data

Events: OnMessage, OnBinary, OnFragmented.

Specyfikacje i źródła

Autorytatywne źródła protokołów implementowanych przez ten komponent.

Dokumentacja i dema

Bezpośredni link do dokumentacji komponentu, gotowy do uruchomienia projekt demo i pobieranie wersji próbnej.

Pomoc online — TsgcWebSocketClient Pełna dokumentacja właściwości, metod i zdarzeń tego komponentu.
Demo Project — Demos\NET\WebSocket Client Gotowy do uruchomienia projekt przykładowy. Dostarczany w pakiecie sgcWebSockets — pobierz wersję próbną poniżej.
Dokument techniczny (PDF) Features, quick start, code samples for Delphi, C++ Builder and .NET and primary-source references — this component only.
Podręcznik użytkownika (PDF) Kompleksowy podręcznik obejmujący każdy komponent biblioteki.

Ready to Get Started?

Download the .NET library and add WebSocket support to your C# application.