ZeroC.Ice.Cpp 3.8.1

Prefix Reserved
dotnet add package ZeroC.Ice.Cpp --version 3.8.1
                    
NuGet\Install-Package ZeroC.Ice.Cpp -Version 3.8.1
                    
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="ZeroC.Ice.Cpp" Version="3.8.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroC.Ice.Cpp" Version="3.8.1" />
                    
Directory.Packages.props
<PackageReference Include="ZeroC.Ice.Cpp" />
                    
Project file
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 ZeroC.Ice.Cpp --version 3.8.1
                    
#r "nuget: ZeroC.Ice.Cpp, 3.8.1"
                    
#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 ZeroC.Ice.Cpp@3.8.1
                    
#: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=ZeroC.Ice.Cpp&version=3.8.1
                    
Install as a Cake Addin
#tool nuget:?package=ZeroC.Ice.Cpp&version=3.8.1
                    
Install as a Cake Tool

Ice for C++

Examples | Documentation | API Reference | Building from source

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++ implementation of the Ice framework.

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.
        string greet(string name);
    }
}
// Client application (Client.cpp)

#include "Greeter.h"

#include <Ice/Ice.h>
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
    Ice::CommunicatorPtr communicator = Ice::initialize(argc, argv);
    Ice::CommunicatorHolder communicatorHolder{communicator};

    VisitorCenter::GreeterPrx greeter{communicator, "greeter:tcp -h localhost -p 4061"};

    string greeting = greeter->greet("alice");
    cout << greeting << endl;
    return 0;
}
// Server application (Server.cpp)

#include "Chatbot.h"

#include <Ice/Ice.h>
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
    Ice::CtrlCHandler ctrlCHandler;

    Ice::CommunicatorPtr communicator = Ice::initialize(argc, argv);
    Ice::CommunicatorHolder communicatorHolder{communicator};

    auto adapter =
        communicator->createObjectAdapterWithEndpoints("GreeterAdapter", "tcp -p 4061");
    adapter->add(make_shared<Server::Chatbot>(), Ice::Identity{"greeter"});

    adapter->activate();
    cout << "Listening on port 4061..." << endl;

    ctrlCHandler.setCallback(
        [communicator](int signal)
        {
            cout << "Caught signal " << signal << ", shutting down..." << endl;
            communicator->shutdown();
        });

    communicator->waitForShutdown();
    return 0;
}
// Greeter implementation (Chatbot.h)

#include "Greeter.h"

#include <iostream>
#include <sstream>

namespace Server
{
    class Chatbot : public VisitorCenter::Greeter
    {
    public:
        std::string greet(std::string name, const Ice::Current&) override
        {
            std::cout
                << "Dispatching greet request { name = '" << name << "' }"
                << std::endl;

            std::ostringstream os;
            os << "Hello, " << name << "!";
            return os.str();
        }
    };
}
Product Compatible and additional computed target framework versions.
native native is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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.8.1 182 3/2/2026
3.8.0 362 12/16/2025