EonaCat.FastNetwork
1.0.0
Prefix Reserved
dotnet add package EonaCat.FastNetwork --version 1.0.0
NuGet\Install-Package EonaCat.FastNetwork -Version 1.0.0
<PackageReference Include="EonaCat.FastNetwork" Version="1.0.0" />
<PackageVersion Include="EonaCat.FastNetwork" Version="1.0.0" />
<PackageReference Include="EonaCat.FastNetwork" />
paket add EonaCat.FastNetwork --version 1.0.0
#r "nuget: EonaCat.FastNetwork, 1.0.0"
#:package EonaCat.FastNetwork@1.0.0
#addin nuget:?package=EonaCat.FastNetwork&version=1.0.0
#tool nuget:?package=EonaCat.FastNetwork&version=1.0.0
π₯ EonaCat.FastNetwork π₯
A lightweight, asynchronous, and secure networking framework for C# that provides TCP and UDP client-server communication with built-in AES encryption, SSL/TLS support, auto-reconnection, and heartbeat monitoring.
This project contains:
FastNetworkClientβ A configurable client capable of connecting to servers over TCP or UDP.FastNetworkServerβ A high-performance server capable of managing multiple clients, broadcasting messages, and monitoring connections.
π Features
β
Supports both TCP and UDP communication
β
Asynchronous I/O with async/await
β
Optional AES encryption for secure communication
β
Optional SSL/TLS (via SslStream)
β
Automatic reconnection logic for clients
β
Heartbeat system for connection health checks
β
Client nickname management
β
Server broadcasting and targeted messaging
β
Configurable limits (buffer size, timeouts, max connections, etc.)
βοΈ Configuration
Both the client and server use a FastNetworkConfig object to control behavior.
Example Configuration
var config = new FastNetworkConfig
{
Protocol = ProtocolType.TCP,
UseAES = true,
AESKey = "your-256-bit-key",
UseSSL = false,
AutoReconnect = true,
HeartbeatIntervalMs = 5000,
ReconnectDelayMs = 3000,
MaxReconnectAttempts = 5,
TimeoutMs = 10000,
BufferSize = 4096
};
π» Usage:
π€© Server Example
using EonaCat.FastNetwork;
using EonaCat.FastNetwork.Models;
using System;
using System.Text;
class Program
{
static async Task Main()
{
var config = new FastNetworkConfig
{
Protocol = ProtocolType.TCP,
UseAES = true,
AESKey = "your-256-bit-key",
AutoReconnect = true
};
var server = new FastNetworkServer(config);
server.ClientConnected += (s, info) =>
{
Console.WriteLine($"Client connected: {info.Id} ({info.RemoteEndPoint})");
};
server.MessageReceived += async (s, msg) =>
{
Console.WriteLine($"Message from {msg.SenderId}: {Encoding.UTF8.GetString(msg.Data)}");
await server.SendToClientAsync(msg.SenderId, Encoding.UTF8.GetBytes("Message received!"));
};
server.ClientDisconnected += (s, info) =>
{
Console.WriteLine($"Client disconnected: {info.Id}");
};
await server.StartAsync(5000);
Console.WriteLine("Server running on port 5000...");
Console.ReadLine();
}
}
π Client Example
using EonaCat.FastNetwork;
using EonaCat.FastNetwork.Models;
using System;
using System.Text;
class Program
{
static async Task Main()
{
var config = new FastNetworkConfig
{
Protocol = ProtocolType.TCP,
UseAES = true,
AESKey = "your-256-bit-key",
AutoReconnect = true
};
var client = new FastNetworkClient(config);
client.StateChanged += (s, state) =>
{
Console.WriteLine($"Client state: {state}");
};
client.MessageReceived += (s, data) =>
{
Console.WriteLine($"Received: {Encoding.UTF8.GetString(data)}");
};
await client.ConnectAsync("127.0.0.1", 5000);
Console.WriteLine("Connected to server.");
await client.SendAsync(Encoding.UTF8.GetBytes("Hello Server!"));
Console.ReadLine();
}
}
π Security Options
π¦βπ₯AES Encryption
Enable AES encryption by setting:
config.UseAES = true;
config.AESKey = "your-256-bit-secret-key";
π¦ SSL/TLS
Enable SSL by providing a certificate:
config.UseSSL = true;
config.Certificates = new[] { yourX509Certificate };
π Auto-Reconnect & Heartbeat
The client will automatically attempt to reconnect if the connection fails, if AutoReconnect = true.
The server uses heartbeats and timeouts to monitor inactive clients and disconnect them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 119 | 10/26/2025 |
A **lightweight, asynchronous, and secure networking framework** for C# that provides TCP and UDP client-server communication with built-in **AES encryption**, **SSL/TLS support**, **auto-reconnection**, and **heartbeat monitoring**.