Greeter Example
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
Writing a client-server application with Ice does not take much code. See for yourself!
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 the following sections:
- Using Slice - How to use the Slice IDL to define a contract between clients and servers.
- Writing a server - How to implement Ice objects and host them in a server.
- Writing a client - How to write a client that communicates with an Ice server.
We write the server first: a client has nothing to call until a server is running.
- Using Slice - How to use the Slice IDL to define a contract between clients and servers.
- Writing a client - How to write a client that communicates with an Ice server.
This example has no server section for this language mapping. You can run the Greeter server from C++, C#, Java, Python or Swift, and call it from the client you write here.
The complete source code for this example is on GitHub, alongside several other demo programs.
The complete source code for this example is on GitHub, alongside several other demo programs.
The complete source code for this example is on GitHub, alongside several other demo programs.
The complete source code for this example is on GitHub, alongside several other demo programs.
The complete source code for this example is on GitHub, alongside several other demo programs.
The complete source code for this example is on GitHub, alongside several other demo programs.
The complete source code for this example is on GitHub, alongside several other demo programs.
The complete source code for this example is on GitHub, alongside several other demo programs.
The complete source code for this example is on GitHub, alongside several other demo programs.