ZeroC.Ice
3.8.1
Prefix Reserved
dotnet add package ZeroC.Ice --version 3.8.1
NuGet\Install-Package ZeroC.Ice -Version 3.8.1
<PackageReference Include="ZeroC.Ice" Version="3.8.1" />
<PackageVersion Include="ZeroC.Ice" Version="3.8.1" />
<PackageReference Include="ZeroC.Ice" />
paket add ZeroC.Ice --version 3.8.1
#r "nuget: ZeroC.Ice, 3.8.1"
#:package ZeroC.Ice@3.8.1
#addin nuget:?package=ZeroC.Ice&version=3.8.1
#tool nuget:?package=ZeroC.Ice&version=3.8.1
Ice for C#
The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more.
Ice for C# is the C# (and .NET) implementation of the Ice framework. The ZeroC.Ice NuGet package provides the Ice assembly.
Package | Source code | Examples | Documentation | API reference
Sample Code
// Slice definitions (Greeter.ice)
module VisitorCenter
{
/// Represents a simple greeter.
interface Greeter
{
/// Creates a personalized greeting.
/// @param name The name of the person to greet.
/// @return The greeting.
["cs:identifier:Greet"] // We prefer PascalCase for C# methods.
string greet(string name);
}
}
// Client application
using VisitorCenter;
await using var communicator = new Ice.Communicator(ref args);
GreeterPrx greeter = GreeterPrxHelper.createProxy(
communicator,
"greeter:tcp -h localhost -p 4061");
string greeting = await greeter.GreetAsync(Environment.UserName);
Console.WriteLine(greeting);
// Server application
await using var communicator = new Ice.Communicator(ref args);
Ice.ObjectAdapter adapter =
communicator.createObjectAdapterWithEndpoints("GreeterAdapter", "tcp -p 4061");
adapter.add(new Server.Chatbot(), new Ice.Identity { name = "greeter" });
adapter.activate();
Console.WriteLine("Listening on port 4061...");
Console.CancelKeyPress += (sender, eventArgs) =>
{
eventArgs.Cancel = true;
Console.WriteLine("Caught Ctrl+C, shutting down...");
communicator.shutdown();
};
await communicator.shutdownCompleted;
// Greeter implementation
using VisitorCenter;
namespace Server;
internal class Chatbot : GreeterDisp_
{
public override string Greet(string name, Ice.Current current)
{
Console.WriteLine($"Dispatching greet request {{ name = '{name}' }}");
return $"Hello, {name}!";
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net8.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on ZeroC.Ice:
| Package | Downloads |
|---|---|
|
ZeroC.Glacier2
Client library for the Glacier2 service |
|
|
ZeroC.IceStorm
Client library for the IceStorm service |
|
|
ZeroC.IceBox
Client library for the IceBox service |
|
|
ZeroC.IceLocatorDiscovery
The IceLocatorDiscovery plug-in |
|
|
ZeroC.IceGrid
Client library for the IceGrid service |
GitHub repositories
This package is not used by any popular GitHub repositories.