This repository has been archived on 2026-05-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ppp2-protocol/protobuf/2.0/PublishDiscover.proto
T
2023-03-22 16:56:24 +01:00

45 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
// Client -> Server
// Request a port to be published or deleted on Discover
// port: the port to publish
// publish:
// true: publish the port
// false: delete the port
// flags: search flags
message PublishRequest {
fixed32 port = 1;
bool publish = 2;
repeated string flags = 3;
}
// Server -> Client
// Acknowledge a PublishRequest
// status: 0 if successful, anything else is an error
message PublishResponse {
uint32 status = 1;
}
// Client -> Server
// Search for peers on Discover
// limit: maximum number of peers to search for
// flags: flags to search for
message DiscoverRequest {
uint32 limit = 1;
repeated string flags = 2;
}
// Server -> Client
// Response to a DiscoverRequest with a list of peers
// status: 0 if successful, anything else is an error
// peers: a list of peers, empty if nothing is found
message DiscoverResponse {
message DiscoverPeer {
uint32 port = 1;
fixed64 address = 2;
repeated string flags = 3;
}
uint32 status = 1;
repeated DiscoverPeer peers = 2;
}