diff --git a/examples/discovery/README.md b/examples/discovery/README.md index d80d5d4..a693638 100644 --- a/examples/discovery/README.md +++ b/examples/discovery/README.md @@ -2,7 +2,7 @@ ## Running The Example -This example demonstrates how to list all active services within your Iceoryx2 +This example demonstrates how to list all active services within your iceoryx2 application. To get the most out of this example, you can combine it with other examples, such as the [event example](../event/) or the [publish-subscribe example](../publish_subscribe/), to see active services in @@ -11,13 +11,13 @@ action. To begin, let's start some interesting services. Open two terminals and execute the following commands: -**Terminal 1** +### Terminal 1 ```sh cargo run --example event_listener ``` -**Terminal 2** +### Terminal 2 ```sh cargo run --example publish_subscribe_subscriber @@ -31,4 +31,4 @@ cargo run --example discovery This will display the static service details of both the event and the publish-subscribe service, giving you a comprehensive view of the active -services in your Iceoryx2 application. +services in your iceoryx2 application. diff --git a/examples/discovery/discovery.rs b/examples/discovery/discovery.rs index 95cfc00..1da072a 100644 --- a/examples/discovery/discovery.rs +++ b/examples/discovery/discovery.rs @@ -13,11 +13,10 @@ use iceoryx2::prelude::*; fn main() -> Result<(), Box> { - let services = zero_copy::Service::list()?; - - for service in services { + ipc::Service::list(Config::global_config(), |service| { println!("\n{:#?}", &service); - } + CallbackProgression::Continue + })?; Ok(()) }