H.Engine.IO
1.2.15
See the version list below for details.
dotnet add package H.Engine.IO --version 1.2.15
NuGet\Install-Package H.Engine.IO -Version 1.2.15
<PackageReference Include="H.Engine.IO" Version="1.2.15" />
paket add H.Engine.IO --version 1.2.15
#r "nuget: H.Engine.IO, 1.2.15"
// Install H.Engine.IO as a Cake Addin #addin nuget:?package=H.Engine.IO&version=1.2.15 // Install H.Engine.IO as a Cake Tool #tool nuget:?package=H.Engine.IO&version=1.2.15
H.Socket.IO
High-performance event-based .NET Socket.IO library with a convenient interface,
aimed at writing the smallest possible code on the user side.
Features:
- Supports the latest version of Socket.IO server
- Supports namespaces
- The library is null-free and does not contain NRE
- Event-based
- Completely asynchronous
Nuget
Install-Package H.Socket.IO
Usage
using System;
using System.Threading.Tasks;
using H.Socket.IO;
#nullable enable
public class ChatMessage
{
public string? Username { get; set; }
public string? Message { get; set; }
public long NumUsers { get; set; }
}
public async Task ConnectToChatNowShTest()
{
await using var client = new SocketIoClient();
client.Connected += (sender, args) => Console.WriteLine($"Connected: {args.Namespace}");
client.Disconnected += (sender, args) => Console.WriteLine($"Disconnected. Reason: {args.Reason}, Status: {args.Status:G}");
client.EventReceived += (sender, args) => Console.WriteLine($"EventReceived: Namespace: {args.Namespace}, Value: {args.Value}, IsHandled: {args.IsHandled}");
client.HandledEventReceived += (sender, args) => Console.WriteLine($"HandledEventReceived: Namespace: {args.Namespace}, Value: {args.Value}");
client.UnhandledEventReceived += (sender, args) => Console.WriteLine($"UnhandledEventReceived: Namespace: {args.Namespace}, Value: {args.Value}");
client.ErrorReceived += (sender, args) => Console.WriteLine($"ErrorReceived: Namespace: {args.Namespace}, Value: {args.Value}");
client.ExceptionOccurred += (sender, args) => Console.WriteLine($"ExceptionOccurred: {args.Value}");
client.On("login", () =>
{
Console.WriteLine("You are logged in.");
});
client.On("login", json =>
{
Console.WriteLine($"You are logged in. Json: \"{json}\"");
});
client.On<ChatMessage>("login", message =>
{
Console.WriteLine($"You are logged in. Total number of users: {message.NumUsers}");
});
client.On<ChatMessage>("user joined", message =>
{
Console.WriteLine($"User joined: {message.Username}. Total number of users: {message.NumUsers}");
});
client.On<ChatMessage>("user left", message =>
{
Console.WriteLine($"User left: {message.Username}. Total number of users: {message.NumUsers}");
});
client.On<ChatMessage>("typing", message =>
{
Console.WriteLine($"User typing: {message.Username}");
});
client.On<ChatMessage>("stop typing", message =>
{
Console.WriteLine($"User stop typing: {message.Username}");
});
client.On<ChatMessage>("new message", message =>
{
Console.WriteLine($"New message from user \"{message.Username}\": {message.Message}");
});
await client.ConnectAsync(new Uri("wss://socketio-chat-h9jt.herokuapp.com/"));
await client.Emit("add user", "C# H.Socket.IO Test User");
await Task.Delay(TimeSpan.FromMilliseconds(200));
await client.Emit("typing");
await Task.Delay(TimeSpan.FromMilliseconds(200));
await client.Emit("new message", "hello");
await Task.Delay(TimeSpan.FromMilliseconds(200));
await client.Emit("stop typing");
await Task.Delay(TimeSpan.FromSeconds(2));
await client.DisconnectAsync();
}
Namespaces
// Will be sent with all messages(Unless otherwise stated).
// Also automatically connects to it.
client.DefaultNamespace = "my";
// or
// Connects to "my" namespace.
await client.ConnectAsync(new Uri(LocalCharServerUrl), namespaces: "my");
// Sends message to "my" namespace.
await client.Emit("message", "hello", "my");
Custom arguments
await client.ConnectAsync(new Uri($"wss://socketio-chat-h9jt.herokuapp.com/?access_token={mAccessToken}"));
Live Example
C# .NET Fiddle - https://dotnetfiddle.net/FWMpQ3
VB.NET .NET Fiddle - https://dotnetfiddle.net/WzIdnG
Http client of the tested Socket.IO server - https://socket-io-chat.now.sh/
Used documentation
Socket.IO Protocol - https://github.com/socketio/socket.io-protocol
Engine.IO Protocol - https://github.com/socketio/engine.io-protocol
Python implementation of Socket.IO - https://github.com/miguelgrinberg/python-socketio/blob/master/socketio/
Python implementation of Engine.IO - https://github.com/miguelgrinberg/python-engineio/blob/master/engineio/
Contacts
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- H.WebSockets (>= 1.2.15)
- Microsoft.NETFramework.ReferenceAssemblies (>= 1.0.2)
- System.Text.Json (>= 7.0.3)
-
.NETStandard 2.0
- H.WebSockets (>= 1.2.15)
- System.Text.Json (>= 7.0.3)
-
.NETStandard 2.1
- H.WebSockets (>= 1.2.15)
- System.Text.Json (>= 7.0.3)
-
net6.0
- H.WebSockets (>= 1.2.15)
-
net7.0
- H.WebSockets (>= 1.2.15)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on H.Engine.IO:
Package | Downloads |
---|---|
H.Socket.IO
High-performance event-based .NET Socket.IO library with a convenient interface, aimed at writing the smallest possible code on the user side. Features: - Supports the latest version of Socket.IO server - Supports namespaces - The library is null-free and does not contain NRE - Event-based - Completely asynchronous |
|
SimpleSocketIoClient
Simple client for Socket.IO, supports the latest version. Includes EngineIoClient and WebSocketClient Implemented features: - Namespaces Note: This is an alpha version. Some features may not be available. Please see examples or tests. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on H.Engine.IO:
Repository | Stars |
---|---|
SaviorXTanren/mixer-mixitup
Streaming bot application for handling chat, events, moderation, and other streamer assistance features
|
Version | Downloads | Last updated |
---|---|---|
1.2.16 | 3,339 | 8/29/2023 |
1.2.15 | 728 | 7/8/2023 |
1.2.14 | 349 | 7/8/2023 |
1.2.13 | 225 | 7/8/2023 |
1.2.11 | 18,501 | 1/4/2023 |
1.2.10 | 4,232 | 8/1/2022 |
1.2.9 | 1,703 | 3/19/2022 |
1.2.7 | 1,927 | 10/23/2021 |
1.2.6 | 496 | 10/21/2021 |
1.2.5 | 438 | 10/21/2021 |
1.2.4 | 446 | 10/21/2021 |
1.2.3 | 441 | 10/21/2021 |
1.2.1 | 1,303 | 7/15/2021 |
1.1.7.1 | 1,707 | 5/7/2021 |
1.1.7 | 31,967 | 1/11/2021 |
1.1.6 | 516 | 1/9/2021 |
1.1.5 | 500 | 1/9/2021 |
1.1.4 | 3,038 | 1/8/2021 |
1.1.3 | 543 | 1/4/2021 |
1.1.2 | 1,110 | 12/17/2020 |
1.1.1 | 3,899 | 12/9/2020 |
1.1.0 | 1,288 | 11/22/2020 |
1.0.4 | 7,249 | 6/5/2020 |
1.0.3 | 672 | 6/3/2020 |
1.0.2 | 660 | 6/3/2020 |
1.0.1 | 572 | 6/3/2020 |
1.0.0 | 749 | 5/27/2020 |
0.15.10 | 659 | 5/21/2020 |
0.15.9 | 787 | 5/21/2020 |
0.15.8 | 641 | 5/21/2020 |
0.15.6 | 610 | 5/21/2020 |
0.15.5 | 729 | 4/21/2020 |
0.15.4 | 580 | 4/21/2020 |
0.15.3 | 683 | 2/3/2020 |
0.15.2 | 631 | 2/2/2020 |
0.15.1 | 669 | 1/29/2020 |
0.15.0 | 680 | 1/29/2020 |
0.14.0 | 13,645 | 1/9/2020 |
⭐ Last 10 features:
- feat: To use System.Text.Json. 2023-07-09
- feat: Added net6.0 and net7.0. 2023-07-09
- feat: Adding property to set RemoteCertificateValidationCallback on WebSocket. 2023-07-09
- feat: Updated EventGenerator. 2023-01-05
- feat: To EventGenerator. 2022-08-02
- feat: Updated NuGet packages. 2022-03-19
- feat: To net6.0 and C# 10. 2021-10-21
- feat: Updated Newtonsoft.Json to 13.0.1. 2021-07-16
🐞 Last 10 bug fixes:
- fix: Fixed ConfigureAwait warning. 2022-03-19
- fix: Fixed </br> in README. 2021-10-21
- fix: Fixed LocalTests. 2021-10-21
- fix: Fixed PackageReadmeFile. 2021-10-21
- Enabled Nullable in project and fixed warnings 2019-11-25