generated from shun-shobon/react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello.proto
67 lines (55 loc) · 1.46 KB
/
hello.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
67
syntax = "proto3";
option go_package = "./;types";
service Hello {
rpc CreateRoom (CreateRoomRequest) returns (Room) {}
// signalling streamが切れると、そのユーザーはRoomからも抜けた扱いになる
rpc Signalling (stream SendSignallingMessage) returns (stream RecvSignallingMessage) {}
}
message CreateRoomRequest {}
message SendSignallingMessage {
oneof body {
SelfIntroduceMessage self_intro = 1;
RoomInfoRequest room_info_request = 2;
SendSdpMessage sdp_message = 3;
SendIceCandidateMessage ice_message = 4;
}
}
message RecvSignallingMessage {
oneof body {
SelfIntroduceResult self_intro_result = 1;
Room room_info_response = 2;
RecvSdpMessage sdp_message = 3;
RecvIceCandidateMessage ice_message = 4;
}
}
message RoomInfoRequest {}
message Room {
int32 room_id = 1;
repeated string joined_user_ids = 2;
}
message SelfIntroduceMessage {
string my_id = 1;
int32 room_id = 2;
}
message SelfIntroduceResult {
bool ok = 1;
string error_message = 2;
}
message SendSdpMessage {
string session_description = 1;
string to_id = 3;
}
message SendIceCandidateMessage {
string ice_candidate = 1;
string to_id = 3;
}
message RecvSdpMessage {
string session_description = 1;
string from_id = 2;
string to_id = 3;
}
message RecvIceCandidateMessage {
string ice_candidate = 1;
string from_id = 2;
string to_id = 3;
}