IceRpc 0.5.2
Prefix ReservedSee the version list below for details.
dotnet add package IceRpc --version 0.5.2
NuGet\Install-Package IceRpc -Version 0.5.2
<PackageReference Include="IceRpc" Version="0.5.2" />
<PackageVersion Include="IceRpc" Version="0.5.2" />
<PackageReference Include="IceRpc" />
paket add IceRpc --version 0.5.2
#r "nuget: IceRpc, 0.5.2"
#:package IceRpc@0.5.2
#addin nuget:?package=IceRpc&version=0.5.2
#tool nuget:?package=IceRpc&version=0.5.2
IceRPC
IceRPC is a modular RPC framework that helps you build networked applications with minimal effort. The IceRpc assembly and package represent the base assembly and package for the C# implementation of IceRPC.
Package | Source code | Getting started | Examples | Documentation | API reference
Sample Code
// Client application
using GreeterCore; // for the StringCodec helper class
using IceRpc;
await using var connection = new ClientConnection(new Uri("icerpc://localhost"));
string greeting = await GreetAsync(Environment.UserName);
Console.WriteLine(greeting);
await connection.ShutdownAsync();
// Create the request to the greeter and then await and decode the response.
async Task<string> GreetAsync(string name)
{
// Construct an outgoing request for the icerpc protocol.
using var request = new OutgoingRequest(new ServiceAddress(Protocol.IceRpc))
{
Operation = "greet",
Payload = StringCodec.EncodeString(name)
};
// Make the invocation: we send the request using the client connection and then wait
// for the response. Since the client connection is not connected yet, this call also
// connects it.
IncomingResponse response = await connection.InvokeAsync(request);
// When the response's status code is Ok, we decode its payload.
if (response.StatusCode == StatusCode.Ok)
{
return await StringCodec.DecodePayloadStringAsync(response.Payload);
}
else
{
// Convert the response into a dispatch exception.
throw new DispatchException(response.StatusCode, response.ErrorMessage);
}
}
// Server application
using GreeterCore; // for the StringCodec helper class
using IceRpc;
// Create a server that will dispatch all requests to the same dispatcher, an instance of
// Chatbot.
await using var server = new Server(new Chatbot());
server.Listen();
// Wait until the console receives a Ctrl+C.
await CancelKeyPressed;
await server.ShutdownAsync();
internal class Chatbot : IDispatcher
{
public async ValueTask<OutgoingResponse> DispatchAsync(
IncomingRequest request,
CancellationToken cancellationToken)
{
if (request.Operation == "greet")
{
string name = await StringCodec.DecodePayloadStringAsync(request.Payload);
Console.WriteLine($"Dispatching greet request {{ name = '{name}' }}");
return new OutgoingResponse(request)
{
Payload = StringCodec.EncodeString($"Hello, {name}!")
};
}
else
{
// We only implement greet.
return new OutgoingResponse(request, StatusCode.NotImplemented);
}
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- ZeroC.Slice (= 0.5.2)
NuGet packages (14)
Showing the top 5 NuGet packages that depend on IceRpc:
| Package | Downloads |
|---|---|
|
IceRpc.Slice
IceRPC + Slice integration for C# |
|
|
IceRpc.Logger
Logger interceptor and middleware for IceRPC |
|
|
IceRpc.Deadline
Deadline interceptor and middleware for IceRPC |
|
|
IceRpc.Extensions.DependencyInjection
Dependency injection extensions for IceRPC |
|
|
IceRpc.Transports.Quic
QUIC transport for IceRPC |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.6.0 | 151 | 6/5/2026 |
| 0.5.2 | 312 | 5/18/2026 |
| 0.5.1 | 431 | 1/7/2026 |
| 0.5.0 | 875 | 12/1/2025 |
| 0.4.1 | 820 | 11/15/2024 |
| 0.4.0.1 | 542 | 9/17/2024 |
| 0.4.0 | 499 | 9/16/2024 |
| 0.3.1 | 3,474 | 3/28/2024 |
| 0.3.0 | 998 | 2/14/2024 |
| 0.2.1 | 1,028 | 12/12/2023 |
| 0.2.0 | 785 | 12/4/2023 |
| 0.1.2 | 727 | 10/9/2023 |
| 0.1.1 | 539 | 9/18/2023 |
| 0.1.0 | 645 | 9/6/2023 |