EonaCat.JASP
1.0.0
Prefix Reserved
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
.NET Framework 4.8
This package targets .NET Framework 4.8. The package is compatible with this framework or higher.
dotnet add package EonaCat.JASP --version 1.0.0
NuGet\Install-Package EonaCat.JASP -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EonaCat.JASP" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EonaCat.JASP" Version="1.0.0" />
<PackageReference Include="EonaCat.JASP" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EonaCat.JASP --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: EonaCat.JASP, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EonaCat.JASP@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EonaCat.JASP&version=1.0.0
#tool nuget:?package=EonaCat.JASP&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
EonaCat.JASP Network Library
Basic TCP Server
using EonaCat.JASP;
var server = new NetworkServer(ProtocolType.TCP, 5000);
server.DataReceived += (s, e) =>
{
var message = Encoding.UTF8.GetString(e.Data);
Console.WriteLine($"Received: {message}");
};
server.Start();
Basic TCP Client
var client = new NetworkClient(ProtocolType.TCP, "127.0.0.1", 5000);
client.DataReceived += (s, e) =>
{
var message = Encoding.UTF8.GetString(e.Data);
Console.WriteLine($"Received: {message}");
};
await client.ConnectAsync();
client.SendString("Hello, Server!");
Advanced
Server with Authentication
var server = new NetworkServer(
ProtocolType.TCP,
5000,
username: "ServerAdmin",
password: "SecurePassword123"
);
server.ClientConnected += (s, e) =>
{
Console.WriteLine($"Authenticated client: {e.Username}");
};
server.Start();
Client with Authentication
var client = new NetworkClient(
ProtocolType.TCP,
"127.0.0.1",
5000,
username: "Alice",
password: "SecurePassword123"
);
await client.ConnectAsync();
Server with AES Encryption
var server = new NetworkServer(
ProtocolType.TCP,
5000,
useAES: true
);
server.Start();
Client with AES Encryption
var client = new NetworkClient(
ProtocolType.TCP,
"127.0.0.1",
5000,
useAES: true
);
await client.ConnectAsync();
UDP Server/Client
// Server
var server = new NetworkServer(ProtocolType.UDP, 5000);
server.Start();
// Client
var client = new NetworkClient(ProtocolType.UDP, "127.0.0.1", 5000);
await client.ConnectAsync();
Client-to-Client Messaging
// On Client 1 (Alice)
alice.SendToClient("Bob", "Hi Bob!");
// On Client 2 (Bob)
bob.DataReceived += (s, e) =>
{
if (e.FromUsername == "Alice")
{
Console.WriteLine($"Message from Alice: {Encoding.UTF8.GetString(e.Data)}");
}
};
Broadcasting to All Clients
// Server broadcasts to all connected clients
server.BroadcastString("Server announcement!");
// Broadcast to all except one client
server.BroadcastString("Message", excludeUsername: "Alice");
Send Binary Data
// Send byte array
byte[] imageData = File.ReadAllBytes("image.jpg");
client.SendData(imageData);
// Send to specific client
client.SendToClient("Bob", imageData);
Network Statistics
// Get server stats
var serverStats = server.GetStats();
Console.WriteLine(serverStats);
// Output:
// Stats:
// Uptime: 00:05:23
// Messages Sent: 15,234
// Messages Received: 15,234
// Bytes Sent: 1,523,400
// Bytes Received: 1,523,400
// Active Connections: 5
// Messages/sec: 47.23
// Errors: 0
// Get client stats
var clientStats = client.GetStats();
Console.WriteLine(clientStats);
Get Connected Clients
var clients = server.GetConnectedClients();
foreach (var client in clients)
{
Console.WriteLine($"{client.Username} - {client.RemoteEndPoint}");
}
Event Handlers
Server Events
server.DataReceived += (s, e) =>
{
// Handle received data
Console.WriteLine($"From: {e.FromUsername}");
Console.WriteLine($"Data: {Encoding.UTF8.GetString(e.Data)}");
};
server.ClientConnected += (s, e) =>
{
Console.WriteLine($"Client connected: {e.Username} ({e.ClientId})");
};
server.ClientDisconnected += (s, e) =>
{
Console.WriteLine($"Client disconnected: {e.Username}");
};
server.ErrorOccurred += (s, e) =>
{
Console.WriteLine($"Error: {e.Message}");
Console.WriteLine($"Exception: {e.Exception}");
};
Client Events
client.DataReceived += (s, e) =>
{
// Handle received data
};
client.Connected += (s, e) =>
{
Console.WriteLine("Connected to server");
};
client.Disconnected += (s, e) =>
{
Console.WriteLine("Disconnected from server");
};
client.ErrorOccurred += (s, e) =>
{
Console.WriteLine($"Error: {e.Message}");
};
| 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 is compatible. 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. |
| .NET Framework | net48 is compatible. net481 was computed. |
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- EonaCat.Versioning.Helpers (>= 1.0.2)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.2)
- Microsoft.Extensions.Logging (>= 10.0.2)
- Microsoft.Extensions.Logging.Console (>= 10.0.2)
- System.Net.Http (>= 4.3.4)
- System.Threading.Channels (>= 10.0.2)
-
.NETStandard 2.1
- EonaCat.Versioning.Helpers (>= 1.0.2)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.2)
- Microsoft.Extensions.Logging (>= 10.0.2)
- Microsoft.Extensions.Logging.Console (>= 10.0.2)
- System.Net.Http (>= 4.3.4)
- System.Threading.Channels (>= 10.0.2)
-
net8.0
- EonaCat.Versioning.Helpers (>= 1.0.2)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.DependencyInjection (>= 10.0.2)
- Microsoft.Extensions.Logging (>= 10.0.2)
- Microsoft.Extensions.Logging.Console (>= 10.0.2)
- System.Net.Http (>= 4.3.4)
- System.Threading.Channels (>= 10.0.2)
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 | 77 | 2/6/2026 |
Public release version