pingtunnel/msg.proto

39 lines
614 B
Protocol Buffer
Raw Normal View History

2019-10-22 04:39:20 +03:00
syntax = "proto3";
option go_package = "pingtunnel";
2019-10-25 16:28:30 +03:00
2019-10-22 04:39:20 +03:00
message MyMsg {
2019-10-22 05:14:00 +03:00
enum TYPE {
DATA = 0;
PING = 1;
2019-10-25 16:28:30 +03:00
MAGIC = 0xdead;
2019-10-22 05:14:00 +03:00
}
2019-10-22 04:39:20 +03:00
string id = 1;
int32 type = 2;
string target = 3;
bytes data = 4;
2019-10-25 16:42:02 +03:00
sint32 rproto = 5;
sint32 magic = 6;
sint32 key = 7;
2019-10-22 04:39:20 +03:00
int32 tcpmode = 8;
int32 tcpmode_buffersize = 9;
int32 tcpmode_maxwin = 10;
int32 tcpmode_resend_timems = 11;
2019-10-26 07:01:30 +03:00
int32 timeout = 12;
2019-10-22 04:39:20 +03:00
}
message Frame {
2019-10-22 16:27:21 +03:00
enum TYPE {
DATA = 0;
REQ = 1;
ACK = 2;
}
2019-10-22 04:39:20 +03:00
int32 type = 1;
bool resend = 2;
int64 sendtime = 3;
int32 id = 4;
bytes data = 5;
repeated int32 dataid = 6;
}