Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Status enum #23

Merged
merged 1 commit into from
Jul 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions relay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,30 @@ Every message in the relay protocol uses the following protobuf:

```
message CircuitRelay {

enum Status {
SUCCESS = 100;
SRC_ADDR_TOO_LONG= 220;
DST_ADDR_TOO_LONG= 221;
SRC_MULTIADDR_INVALID= 250;
DST_MULTIADDR_INVALID= 251;
NO_CONN_TO_DST = 260;
CANT_DIAL_DST = 261;
CANT_OPEN_DST_STREAM = 262;
CANT_SPEAK_RELAY = 270;
CANT_REALAY_TO_SELF = 280;
SRC_ADDR_TOO_LONG = 320;
DST_ADDR_TOO_LONG = 321;
SRC_MULTIADDR_INVALID = 350;
DST_MULTIADDR_INVALID = 351;
}

enum Type { // RPC identifier, either HOP, STOP or STATUS
HOP = 1;
STOP = 2;
HOP = 1;
STOP = 2;
STATUS = 3;
}

message Peer {
required bytes id = 1; // peer id
repeated bytes addrs = 2; // peer's known addresses
Expand All @@ -137,7 +155,7 @@ message CircuitRelay {
optional Peer srcPeer = 2; // srcPeer and dstPeer are used when Type is HOP or STATUS
optional Peer dstPeer = 3;

optional String code = 4; // Status code, used when Type is STATUS
optional Status code = 4; // Status code, used when Type is STATUS
}
```

Expand Down