.NET WebSocket Server

TsgcWebSocketHTTPServer for .NET — an HTTP.SYS-based WebSocket and HTTP server supporting shared ports, SSL/TLS, and high-concurrency connections.

TsgcWebSocketHTTPServer (.NET)

C# / .NET port of TsgcWebSocketHTTPServer. Bind to a port, hook OnMessage, broadcast with WriteData — same surface as the Delphi component.

Klasa komponentu

TsgcWebSocketHTTPServer

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

Professional / Enterprise

Drop the component, set a few properties, go

Bind to a port, hook OnConnect/OnMessage, then set Active = true.

using esegece.sgcWebSockets;

var server = new TsgcWebSocketHTTPServer();
server.Port = 80;

server.OnConnect        += (conn) => server.WriteData("welcome " + conn.IP);
server.OnMessage        += (conn, text) => server.WriteData(text);
server.OnDisconnect     += (conn, code) => Console.WriteLine("#bye " + conn.IP);
server.OnAuthentication += (conn, user, pass, ref ok) => { ok = (user == "admin" && pass == "s3cret"); };

server.Active = true;

Co jest w środku

27 published properties, 7 methods, 22 events — pulled from the component reference.

Connection

Published properties: Active, Port, Bindings.

Messaging

Methods: Broadcast, WriteData, Ping.

Reliability

Published properties: HeartBeat, WatchDog, LoadBalancer.

Security

Published properties: Authentication, SSL, SSLOptions.

Lifecycle

Events: OnStartup, OnShutdown, OnTCPConnect.

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 — TsgcWebSocketServer Pełna dokumentacja właściwości, metod i zdarzeń tego komponentu.
Demo Project — Demos\NET\WebSocket Server 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 Build Your .NET Server?

Download the library and create a WebSocket server in C# today.