Skip to main content
Skip table of contents

Greeter Example

In this example, we describe how to write a simple client-server application, step by step.

This application is a typical Greeter: a server hosts a Greeter object that produces custom greetings, and the client calls the server to get these greetings. Even though it’s simple, this application demonstrates best practices and provides a good foundation for starting any Ice project.

We present this example in 3 sections:

  1. Using Slice - How to use the Slice IDL to define a contract between clients and servers.

  2. Writing a client - How to write a client that communicates with an Ice server.

  3. Writing a server - How to implement Ice objects and host them in a server.

The complete source code for this example is on Github, alongside several other demo programs.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.