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/Glacier2/callback/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)

project(glacier2_callback CXX)

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

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

add_executable(server Server.cpp CallbackI.cpp CallbackI.h Callback.ice)
slice2cpp_generate(server)
target_link_libraries(server Ice::Ice)
31 changes: 28 additions & 3 deletions cpp/Glacier2/callback/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,47 @@
# Glacier2 Callback

This example demonstrates the use of several Glacier2 features, including
[callbacks][1] and [request contexts][2].

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 Glacier2 router:

```
```shell
glacier2router --Ice.Config=config.glacier2
```

In a separate window, start the client:

**Linux/macOS:**

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

**Windows:**

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

If you plan to run this demo using clients on different hosts than the
Expand Down
13 changes: 13 additions & 0 deletions cpp/Glacier2/simpleChat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.16)

project(glacier2_simpleChat CXX)

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

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

add_executable(server Server.cpp ChatSessionI.cpp ChatSessionI.h Chat.ice)
slice2cpp_generate(server)
target_link_libraries(server Ice::Ice Ice::Glacier2)
31 changes: 28 additions & 3 deletions cpp/Glacier2/simpleChat/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,47 @@
# Glacier2 Simple Chat

This example presents a very simple chat server to demonstrate the use of a
[Glacier2 session][1].

To build the demo run:

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

To run the demo, first start the chat server:

**Linux/macOS:**

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

**Windows:**

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

In a separate window, start the Glacier2 router:

```
```shell
glacier2router --Ice.Config=config.glacier2
```

In a separate window, start the client:

**Linux/macOS:**

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

**Windows:**

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

If you plan to run this demo using clients running on different hosts
Expand Down