From 8e27a443373689cfb026fdf7057d134fc54d4c61 Mon Sep 17 00:00:00 2001 From: Martin Pecka Date: Mon, 16 Sep 2024 23:13:42 +0200 Subject: [PATCH] tutorials/05_services: Windows improvements (#536) Signed-off-by: Martin Pecka --- tutorials/05_services.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/tutorials/05_services.md b/tutorials/05_services.md index 801a8fa8..da4e0e95 100644 --- a/tutorials/05_services.md +++ b/tutorials/05_services.md @@ -609,6 +609,25 @@ cmake --build . --config Release ## Running the examples +> **NOTE** +> It is essential to have a valid value of `GZ_PARTITION` environment variable +> and to have it set to the same value in all open terminals. As `GZ_PARTITION` +> is based on hostname and username, especially Windows and Mac users might +> have problems due to spaces in their username, which are not a valid character +> in `GZ_PARTITION`. gz-transport prints error `Invalid partition name` in such +> case. To resolve that, set `GZ_PARTITION` explicitly to a valid value: +> ```bash +> # Linux and Mac +> export GZ_PARTITION=test +> # Windows +> set GZ_PARTITION=test +> ``` + +> **NOTE** +> On Windows, you can see firewall or antivirus prompts when running the examples. +> For them to work properly, you should allow all communication to the +> example programs. + Open three new terminals and from your ``build/`` directory run the executables. From terminal 1: @@ -661,7 +680,11 @@ directory run the executables. From terminal 1: ```{.sh} +# Linux and MacOS ./responser_oneway + +# Windows +.\Release\responser_oneway.exe ``` From terminal 2: @@ -678,11 +701,7 @@ In your responser terminal, you should expect an output similar to this one, showing that your service provider has received a request: ```{.sh} -# Linux and MacOS ./responser_oneway - -# Windows -.\Release\responser_oneway.exe Request received: [HELLO] ``` @@ -723,12 +742,8 @@ In your requesters' terminals, you should expect an output similar to this one, showing that you have received a response: ```{.sh} -# Linux and MacOS ./requester_no_input -# Windows -.\Release\requester_no_input.exe - Press to exit Response: [This is it! This is the answer. It says here...that a bolt of lightning is going to strike the clock tower at precisely 10:04pm, next