PulseRPC.Abstractions
0.2.5
.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.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PulseRPC.Abstractions --version 0.2.5
NuGet\Install-Package PulseRPC.Abstractions -Version 0.2.5
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="PulseRPC.Abstractions" Version="0.2.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PulseRPC.Abstractions" Version="0.2.5" />
<PackageReference Include="PulseRPC.Abstractions" />
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 PulseRPC.Abstractions --version 0.2.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PulseRPC.Abstractions, 0.2.5"
#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 PulseRPC.Abstractions@0.2.5
#: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=PulseRPC.Abstractions&version=0.2.5
#tool nuget:?package=PulseRPC.Abstractions&version=0.2.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PulseRPC
PulseRPC 是一个基于 TCP 的现代 RPC 框架,专为 .NET 和 Unity 平台设计。它提供了高性能、易用性和可扩展性的完美平衡。
特性
- 高性能:优化的消息序列化、压缩和传输机制
- 易用性:自动代码生成,简化开发流程
- 可扩展:灵活的插件系统和中间件支持
- Unity支持:专门的Unity客户端支持
- 开发工具:完整的开发和调试工具链
快速开始
环境要求
- .NET 8 SDK
- Visual Studio 2022 或 JetBrains Rider
- Unity 2021.3 或更高版本(如果使用 Unity)
安装
.NET 项目
通过 NuGet 安装:
# 安装核心抽象包(必需)
dotnet add package PulseRPC.Abstractions
# 安装客户端包
dotnet add package PulseRPC.Client
或在 PackageReference 中添加:
<PackageReference Include="PulseRPC.Abstractions" Version="1.0.0" />
<PackageReference Include="PulseRPC.Client" Version="1.0.0" />
Unity 项目
Unity项目安装请参考Unity集成指南。
基本用法
// 1. 定义消息
[Message(1)]
public class HelloRequest : IMessage
{
public string Name { get; set; }
}
// 2. 实现服务
public class GreetingService
{
[RpcHandler]
public async Task<HelloResponse> HandleHello(HelloRequest request)
{
return new HelloResponse { Greeting = $"Hello, {request.Name}!" };
}
}
// 3. 启动服务器
var server = new PulseServer();
server.RegisterService<GreetingService>();
await server.StartAsync("127.0.0.1", 5000);
// 4. 客户端调用
var client = new PulseClient();
await client.ConnectAsync("127.0.0.1", 5000);
var response = await client.SendAsync<HelloResponse>(new HelloRequest { Name = "World" });
项目结构
src/
├── PulseRPC.Core/ # 核心库
├── PulseRPC.Client/ # 客户端库
├── PulseRPC.Server/ # 服务端库
├── PulseRPC.Client.Unity/ # Unity客户端
└── PulseRPC.Generators/ # 代码生成器
文档
入门指南
核心功能
最佳实践
开发指南
示例项目
版本信息
贡献
欢迎贡献代码、报告问题或提出建议。详情请参考贡献指南。
许可证
本项目采用 MIT 许可证 - 详见 LICENSE 文件
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. |
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.
-
.NETStandard 2.1
- MemoryPack (>= 1.21.4)
- MemoryPack.Core (>= 1.21.4)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.0)
- System.CodeDom (>= 9.0.4)
- System.Collections.Immutable (>= 6.0.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
-
net8.0
- MemoryPack (>= 1.21.4)
- MemoryPack.Core (>= 1.21.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- System.CodeDom (>= 9.0.4)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on PulseRPC.Abstractions:
Package | Downloads |
---|---|
PulseRPC.Client
PulseRPC Client library with integrated ServiceDiscovery and LoadBalancing |
|
PulseRPC.Server
Unified Realtime/API framework for .NET platform and Unity. |
|
PulseRPC.Infrastructure
Unified Realtime/API framework for .NET platform and Unity. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.6.4 | 125 | 8/4/2025 |
0.6.2 | 95 | 7/30/2025 |
0.5.42 | 92 | 7/29/2025 |
0.5.41 | 89 | 7/29/2025 |
0.5.40 | 116 | 7/27/2025 |
0.5.39 | 354 | 7/25/2025 |
0.5.30 | 381 | 7/25/2025 |
0.5.25 | 384 | 7/25/2025 |
0.5.23 | 433 | 7/25/2025 |
0.5.19 | 443 | 7/24/2025 |
0.5.18 | 437 | 7/24/2025 |
0.5.16 | 438 | 7/24/2025 |
0.5.15 | 439 | 7/24/2025 |
0.5.14 | 439 | 7/24/2025 |
0.5.13 | 441 | 7/24/2025 |
0.5.12 | 485 | 7/23/2025 |
0.5.11 | 490 | 7/23/2025 |
0.5.6 | 187 | 7/20/2025 |
0.3.4 | 145 | 7/16/2025 |
0.3.3 | 163 | 6/14/2025 |
0.3.2 | 236 | 6/13/2025 |
0.3.1 | 128 | 6/8/2025 |
0.3.0 | 133 | 6/7/2025 |
0.2.8 | 153 | 5/29/2025 |
0.2.7 | 161 | 5/28/2025 |
0.2.6 | 160 | 5/27/2025 |
0.2.5 | 161 | 5/27/2025 |
0.1.1 | 301 | 5/26/2025 |
0.1.0 | 168 | 5/25/2025 |