blob: 4f14c867052164dc35575e7f37e7f8bfa44d2206 [file] [log] [blame]
// Copyright 2020 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.
// TODO(https://fxbug.dev/365602428): Either remove the dependency from CTF
// tests and uncomment this line or make this library stable.
// @available(added=HEAD)
library fuchsia.examples;
// [START max]
const MAX_STRING_LENGTH uint64 = 32;
// [END max]
// [START echo]
@discoverable
closed protocol Echo {
strict EchoString(struct {
value string:MAX_STRING_LENGTH;
}) -> (struct {
response string:MAX_STRING_LENGTH;
});
strict SendString(struct {
value string:MAX_STRING_LENGTH;
});
strict -> OnString(struct {
response string:MAX_STRING_LENGTH;
});
};
// [END echo]
// [START launcher]
@discoverable
closed protocol EchoLauncher {
strict GetEcho(struct {
echo_prefix string:MAX_STRING_LENGTH;
}) -> (resource struct {
response client_end:Echo;
});
strict GetEchoPipelined(resource struct {
echo_prefix string:MAX_STRING_LENGTH;
request server_end:Echo;
});
};
// [END launcher]
service EchoService {
regular_echo client_end:Echo;
reversed_echo client_end:Echo;
};