blob: d1bcf07cce96d87c112eea7131bfa14407fc9211 [file] [log] [blame]
// Copyright 2018 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.
library fuchsia.overnet;
using fuchsia.overnet.protocol;
[Discoverable, Transport = "Channel, OvernetEmbedded"]
protocol Overnet {
ListPeers(uint64 last_seen_version) -> (uint64 version, vector<Peer> peers);
// TODO(ctiller): remove this, and move to something that looks way more like an explicit registry.
RegisterService(string:fuchsia.overnet.protocol.MAX_SERVICE_NAME_LENGTH service_name,
ServiceProvider provider);
ConnectToService(fuchsia.overnet.protocol.NodeId node,
string:fuchsia.overnet.protocol.MAX_SERVICE_NAME_LENGTH service_name,
handle<channel> chan);
};
[Transport = "Channel, OvernetEmbedded"]
protocol ServiceProvider {
ConnectToService(handle<channel> chan);
};
struct Peer {
fuchsia.overnet.protocol.NodeId id;
bool is_self;
fuchsia.overnet.protocol.PeerDescription description;
};