| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // [START example_snippet] |
| { |
| // Two children: a server and client. |
| children: [ |
| { |
| name: "echo_server", |
| url: "#meta/echo_server.cm", |
| }, |
| { |
| name: "echo_client", |
| url: "#meta/echo_client.cm", |
| }, |
| ], |
| offer: [ |
| // Route Echo protocol from server to client. |
| { |
| protocol: "fidl.examples.routing.echo.Echo", |
| from: "#echo_server", |
| to: "#echo_client", |
| }, |
| |
| // Route diagnostics protocols to both children. |
| { |
| protocol: [ |
| "fuchsia.inspect.InspectSink", |
| "fuchsia.logger.LogSink", |
| ], |
| from: "parent", |
| to: [ |
| "#echo_client", |
| "#echo_server", |
| ], |
| }, |
| ], |
| } |
| |
| // [END example_snippet] |