STTech.BytesIO.P2P
3.3.0.1-alpha61010
This is a prerelease version of STTech.BytesIO.P2P.
dotnet add package STTech.BytesIO.P2P --version 3.3.0.1-alpha61010
NuGet\Install-Package STTech.BytesIO.P2P -Version 3.3.0.1-alpha61010
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="STTech.BytesIO.P2P" Version="3.3.0.1-alpha61010" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="STTech.BytesIO.P2P" Version="3.3.0.1-alpha61010" />
<PackageReference Include="STTech.BytesIO.P2P" />
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 STTech.BytesIO.P2P --version 3.3.0.1-alpha61010
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: STTech.BytesIO.P2P, 3.3.0.1-alpha61010"
#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 STTech.BytesIO.P2P@3.3.0.1-alpha61010
#: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=STTech.BytesIO.P2P&version=3.3.0.1-alpha61010&prerelease
#tool nuget:?package=STTech.BytesIO.P2P&version=3.3.0.1-alpha61010&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
STTech.BytesIO.P2P
STTech.BytesIO.P2P 是基于 Nethermind.Libp2p 实现的点对点(P2P)去中心化通信扩展库。在继承 STTech.BytesIO 统一 BytesClient 编程体验的同时,赋予应用去中心化节点发现、NAT 穿透及安全通信能力。
🌟 核心特性
- 🌐 去中心化网络:
- Kademlia DHT 分布式节点发现与路由
- mDNS 局域网节点快速发现
- Relay 中继节点与 NAT 穿透支持
- PubSub 消息发布/订阅机制
- 🔒 高安全性:内置 Noise 与 TLS 协议握手加密,保护点对点传输隐私。
- 🔄 统一架构:继承
BytesClient,与常规 TCP/串口保持相同的事件与数据流模型。
📦 安装
dotnet add package STTech.BytesIO.P2P
🚀 快速上手
using STTech.BytesIO.P2P;
// 1. 创建 P2P 通信客户端
var client = new PeerClient();
client.OnDataReceived += (s, e) =>
{
Console.WriteLine($"收到 P2P 节点消息: {e.Data.ToHexString()}");
};
// 2. 通过 Multiaddr 连接目标对等节点
await client.ConnectAsync("/ip4/192.168.1.100/tcp/4001/p2p/12D3KooW...");
// 3. 发送数据
await client.SendAsync(new byte[] { 0x01, 0x02 });
📄 开源许可证
本项目基于 Apache-2.0 协议开源。
| 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 is compatible. 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.
-
net10.0
- Nethermind.Libp2p (>= 1.0.0-preview.51)
- STTech.BytesIO (>= 3.3.0-alpha0730)
-
net9.0
- Nethermind.Libp2p (>= 1.0.0-preview.51)
- STTech.BytesIO (>= 3.3.0-alpha0730)
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 |
|---|---|---|
| 3.3.0.1-alpha61010 | 41 | 10/10/2026 |
| 3.3.0-alpha0730 | 100 | 7/29/2026 |
| 3.2.0-beta0706 | 78 | 7/12/2026 |
| 3.1.0.1-beta0630 | 85 | 6/30/2026 |
| 3.1.0-beta0629 | 79 | 6/29/2026 |