.NET WebSocket Server
TsgcWebSocketHTTPServer for .NET — an HTTP.SYS-based WebSocket and HTTP server supporting shared ports, SSL/TLS, and high-concurrency connections.
TsgcWebSocketHTTPServer for .NET — an HTTP.SYS-based WebSocket and HTTP server supporting shared ports, SSL/TLS, and high-concurrency connections.
C# / .NET port of TsgcWebSocketHTTPServer. Bind to a port, hook OnMessage, broadcast with WriteData — same surface as the Delphi component.
TsgcWebSocketHTTPServer
WebSocket — RFC 6455
.NET Framework 2.0–4.8, .NET Core 1.0–3.1, .NET 5–9, .NET Standard 1.6 / 2.0
Professional / Enterprise
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;
27 published properties, 7 methods, 22 events — pulled from the component reference.
Published properties: Active, Port, Bindings.
Methods: Broadcast, WriteData, Ping.
Published properties: HeartBeat, WatchDog, LoadBalancer.
Published properties: Authentication, SSL, SSLOptions.
Events: OnStartup, OnShutdown, OnTCPConnect.
Events: OnMessage, OnBinary, OnFragmented.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — TsgcWebSocketServer Full property, method and event reference for this component. | Open | |
| Demo Project — Demos\NET\WebSocket Server 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 |