-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.signaling.proto
66 lines (60 loc) · 2.08 KB
/
types.signaling.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
syntax = "proto3";
package pb;
option go_package = "./signalingpb";
// **************************************************** 通用 ***************************************************** //
// SDPType describes the type of an SessionDescription.
enum SDPType {
SDPTypeUnkown = 0;
// SDPTypeOffer indicates that a description MUST be treated as an SDP
// offer.
SDPTypeOffer = 1;
// SDPTypePranswer indicates that a description MUST be treated as an
// SDP answer, but not a final answer. A description used as an SDP
// pranswer may be applied as a response to an SDP offer, or an update to
// a previously sent SDP pranswer.
SDPTypePranswer = 2;
// SDPTypeAnswer indicates that a description MUST be treated as an SDP
// final answer, and the offer-answer exchange MUST be considered complete.
// A description used as an SDP answer may be applied as a response to an
// SDP offer or as an update to a previously sent SDP pranswer.
SDPTypeAnswer = 3;
// SDPTypeRollback indicates that a description MUST be treated as
// canceling the current SDP negotiation and moving the SDP offer and
// answer back to what it was in the previous stable state. Note the
// local or remote SDP descriptions in the previous stable state could be
// null if there has not yet been a successful offer-answer negotiation.
SDPTypeRollback = 4;
}
// *************************************************** 网关 **************************************************** //
// peer端和server端的交互消息
message MessageForPeerServer {
enum Type {
// 发送请求
Request = 0;
// 发送响应
Response = 1;
}
Type type = 1;
optional RequestForPeerServer request = 2;
optional ResponseForPeerServer response = 3;
}
// RequestForPeerServer 请求
message RequestForPeerServer {
enum Type {
// 获取回答
GetAnswer = 0;
}
Type type = 1;
string requestId = 2;
bytes payload = 3;
}
// ResponseForPeerServer 响应
message ResponseForPeerServer {
enum Type {
// 获取回答
GetAnswer = 0;
}
Type type = 1;
string requestId = 2;
bytes payload = 3;
}