| // 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 service_name, ServiceProvider provider); |
| ConnectToService(fuchsia.overnet.protocol.NodeId node, |
| string 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; |
| }; |