blob: b85fe7e9b74c7ee07b91aa321993ecbe7be2e807 [file] [log] [blame]
Zsolt Harasztie39523b2016-10-16 19:30:34 -07001syntax = "proto3";
2
3package experiment;
4
5import "google/protobuf/empty.proto";
6
7message AsyncEvent {
8 int32 seq = 1;
9 enum EventType {
10 BIG_BANG = 0;
11 SMALL_BANG = 1;
12 NO_BANG = 2;
13 }
14 EventType type = 2;
15 string details = 3;
16}
17
18message Packet {
19 int32 source = 1;
20 bytes content = 2;
21}
22message Echo {
23 string msg = 1;
24 float delay = 2;
25}
26
27service ExperimentalService {
28
29 rpc GetEcho(Echo) returns(Echo);
30
31 // For server to send async stream to client
32 rpc ReceiveStreamedEvents(google.protobuf.Empty)
33 returns(stream AsyncEvent);
34
35 // For server to send async packets to client
36 rpc ReceivePackets(google.protobuf.Empty) returns(stream Packet);
37
38 // For client to send async packets to server
39 rpc SendPackets(stream Packet) returns(google.protobuf.Empty);
40
41}