sgcWebSockets is a complete package providing access to WebSockets protocol, allowing to create WebSockets Servers and WebSocket Clients in .NET Applications for Windows 32/64 bits.
Installation
Assembly Reference
You can work with sgcWebSockets .NET package without installing a VSIX package, just open your project and Add Reference from contextual menu over project and select in Assemblies Folder the assembly you want to add as reference.
Download sgcWebSockets Trial from the following url:
sgcWebSockets .NET Trial
VSIX Package
If you want to install sgcWebSockets Package in your ToolBox, double click over VSIX/esegece.sgcWebSockets.vsix package and follow the instructions of VSIX Installer. Requires Visual Studio 2012+ and .NET Framework 4.5.
If you install VSIX, remember to copy sgcWebSockets.dll where is your application folder.
Available Assemblies:
- .NET Framework 2.0
- .NET Framework 3.5
- .NET Framework 4.0
- .NET Framework 4.5
- .NET Framework 5.0
- .NET Standard 1.6
- .NET Standard 2.0
- .NET Core 1.1
- .NET Core 2.0
- .NET Core 3.0
Features
- Fully functional multithreaded WebSocket server according to RFC 6455.
- Supports Windows 32 / Windows 64
- Assemblies for .NET FRAMEWORK (2.0+), .NET STANDARD (1.1+), .NET CORE (1.0+).
- Supports Chrome, Firefox, Safari, Opera and Internet Explorer (including iPhone, iPad and iPod)
- Multiple Threads Support. Indy Servers support IOCP or default Indy one thread per connection model.
- Supports Message Compression using PerMessage_Deflate extension RFC 7692.
- Supports Text and Binary Messages.
- Supports Server and Client Authentication.
- Server component providing WebSocket and HTTP connections through the same port.
- FallBack support through Adobe Flash for old Web Browsers like Internet Explorer from 6+.
- Supports Server-Sent Events (Push Notifications) over HTTP Protocol.
- WatchDog and HeartBeat built-in support.
- Client WebSocket supports connections through HTTP Proxy Servers and SOCKS Proxy Servers.
- Events Available: OnConnect, OnDisconnect, OnMessage, OnError, OnHandshake
- Protocols Supported: MQTT (3.1.1 and 5.0), WebRTC.
- OAuth2 Authorization support on Server and Client.
- Build a fully featured Telegram Client.
- Built-in Javascript libraries to support browser clients.
- Easy to setup
- Javascript Events for full control
- SSL/TLS Support for Server / Client Components (OpenSSL libraries required). OpenSSL 1.1.1 libraries are supported. Client supports SChannel for Windows.
QuickStart
WebSocket Server
- Create a new Window Forms Application
- Drop a TsgcWebSocketServer onto a Form.
- On Events Tab, Double click OnMessage Event, and type following code:
private void OnMessage(TsgcWSConnection Connection, const string Text)
{
MessageBox.Show("Message Received From Client: " + Text);
}
- Drop a Button onto the Form, Double Click and type this code:
TsgcWebSocketServer1.Active = True;
WebSocket Client
- Create a new Window Forms Application
- Drop a TsgcWebSocketClient onto a Form and configure Host and Port Properties to connect to Server.
- Drop a TButton in a Form, Double Click and type this code:
TsgcWebSocketClient1.Active = true;
- Drop a Button onto the Form, Double Click and type this code:
TsgcWebSocketClient1.WriteData("Hello Server From VCL Client");