forked from martinpal/twt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
twt.proto
23 lines (20 loc) · 1.08 KB
/
twt.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
syntax = "proto3";
package twtproto;
option go_package = "twt/twtproto";
message ProxyComm {
enum MessageType {
DATA_DOWN = 0; // downlink data, presumably most frequent message type
DATA_UP = 1; // uplink data
OPEN_CONN = 2; // open remote connection to server
CLOSE_CONN_S = 3; // close remote connection to server
CLOSE_CONN_C = 4; // close local connection to client
PING = 5; // ping
}
MessageType mt = 1;
uint64 proxy = 2; // id of the proxy which is sending the message, must by globally unique
uint64 connection = 3; // sequential number of the connection on the local side of the proxy
uint64 seq = 4; // sequential number of the message within the connection, sequential numbers are independent per up/down directions
string address = 5; // remote address to connect to, only used in OPEN_CONN message
uint32 port = 6; // remote port to connect to, only used in OPEN_CONN message
bytes data = 7; // data chunk, only used in DATA_* messages
}