Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions cpp/IceDiscovery/hello/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)

project(icediscovery_hello CXX)

include(../../cmake/common.cmake)

add_executable(client Client.cpp Hello.ice)
slice2cpp_generate(client)
target_link_libraries(client Ice::Ice)

add_executable(server Server.cpp HelloI.cpp HelloI.h Hello.ice)
slice2cpp_generate(server)
target_link_libraries(server Ice::Ice)
29 changes: 27 additions & 2 deletions cpp/IceDiscovery/hello/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
# IceDiscovery Hello

This demo is the Ice hello world demo configured to use [IceDiscovery][1].

To build the demo run:

```shell
cmake -B build
cmake --build build --config Release
```

To run the demo, first start the server:

**Linux/macOS:**

```shell
./build/server
```
server

**Windows:**

```shell
build\Release\server
```

In a separate window, start the client:

**Linux/macOS:**

```shell
./build/client
```
client

**Windows:**

```shell
build\Release\client
```

The client and server use IceDiscovery to enable the location of the
Expand Down
13 changes: 13 additions & 0 deletions cpp/IceDiscovery/replication/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)

project(icediscovery_replication CXX)

include(../../cmake/common.cmake)

add_executable(client Client.cpp Hello.ice)
slice2cpp_generate(client)
target_link_libraries(client Ice::Ice)

add_executable(server Server.cpp HelloI.cpp HelloI.h Hello.ice)
slice2cpp_generate(server)
target_link_libraries(server Ice::Ice)
30 changes: 26 additions & 4 deletions cpp/IceDiscovery/replication/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,39 @@
# IceDiscovery Replication

This demo shows how to use replication with [IceDiscovery][1].

To run the demo, start the 3 servers:

**Linux/macOS:**

```shell
./build/client --Ice.Config=config.server1
./build/client --Ice.Config=config.server2
./build/client --Ice.Config=config.server3
```
server --Ice.Config=config.server1
server --Ice.Config=config.server2
server --Ice.Config=config.server3

**Windows:**

```shell
build\Release\client --Ice.Config=config.server1
build\Release\client --Ice.Config=config.server2
build\Release\client --Ice.Config=config.server3
```

Server is located in the `build` directory on Linux/macOS and in the `build\Release` directory on Windows.

In a separate window:

**Linux/macOS:**

```shell
./build/client
```
client

**Windows:**

```shell
build\Release\client
```

The client invokes the number of specified iterations with a given
Expand Down
Loading