Sowa705.ChaseNet2
0.1.11
dotnet add package Sowa705.ChaseNet2 --version 0.1.11
NuGet\Install-Package Sowa705.ChaseNet2 -Version 0.1.11
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="Sowa705.ChaseNet2" Version="0.1.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sowa705.ChaseNet2" Version="0.1.11" />
<PackageReference Include="Sowa705.ChaseNet2" />
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 Sowa705.ChaseNet2 --version 0.1.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sowa705.ChaseNet2, 0.1.11"
#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 Sowa705.ChaseNet2@0.1.11
#: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=Sowa705.ChaseNet2&version=0.1.11
#tool nuget:?package=Sowa705.ChaseNet2&version=0.1.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ChaseNet2
Peer to peer networking library written in pure C#
Advantages
- Real P2P system
- Powerful serialization system
- Custom protocol
- Low latency - UDP based
- Message acknowledgement and retransmission
- Message compression
- E2E encryption
Basic Usage
Most important classes are ConnectionManager
and Connection
. ConnectionManager is used to create connections and listen for incoming connections. Connection is a point to point connection between two ConnectionManagers.
// Create a connection manager
var connectionManager = new ConnectionManager(); // optionally pass a port number to listen on
connectionManager.StartBackgroundThread(); // start a background thread to handle network events
// Create a connection to another connection manager
var connection = await connectionManager.CreateConnection(IPEndPoint.Parse("127.0.0.1:1234"));
// Register the message class with the serialization system (Any class that can be serialized with Protobuf-net)
connectionManager.Serializer.RegisterType<string>();
// Send a message
// (message type, channel ID, message content)
var sentMessage = connection.EnqueueMessage(MessageType.Reliable | MessageType.Priority, 1234, "Hello !");
// Receive a message
connection.IncomingMessages.TryDequeue(out var message)
switch (message.Content)
{
case string str:
Console.WriteLine($"Received string: {str}");
break;
}
Projects included
- ChaseNet2 - Main library
- ChaseNet2.SimpleTracker - Simple tracker implementation
- ChaseNet2.FileTransfer - File transfer demo
- ChaseNet2.Tests - Unit tests
TODO
- More tracker features
- External key exchange integration
- Documentation
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Portable.BouncyCastle (>= 1.9.0)
- protobuf-net (>= 3.1.26)
- Serilog (>= 2.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.