blob: c64c1243da1323cb91fce683d48dae963aba9880 [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]
interface Overnet {
ListPeers() -> (vector<Peer> peers);
// TODO(ctiller): remove this, and move to something that looks way more like an explicit registry.
RegisterService(string service_name, ServiceProvider provider);
ConnectToService(fuchsia.overnet.protocol.NodeId node,
string service_name, handle<channel> chan);
};
interface ServiceProvider {
ConnectToService(string service_name, handle<channel> chan);
};
struct Peer {
fuchsia.overnet.protocol.NodeId id;
bool is_self;
fuchsia.overnet.protocol.PeerDescription description;
};