]> git.sesse.net Git - cubemap/blob - state.proto
Change from level-triggered to edge-triggered epoll mode. More than halves CPU usage.
[cubemap] / state.proto
1 // Corresponds to struct Client.
2 message ClientProto {
3         optional int32 sock = 1;
4         optional int32 state = 2;
5         optional bytes request = 3;
6         optional string stream_id = 4;
7         optional bytes header_or_error = 5;
8         optional int64 header_or_error_bytes_sent = 6;
9         optional int64 bytes_sent = 7;
10 };
11
12 // Corresponds to struct Stream.
13 message StreamProto {
14         optional bytes header = 1;
15         optional bytes data = 2;
16         optional int64 data_size = 3;
17         optional string stream_id = 4;
18 };
19
20 message CubemapStateProto {
21         repeated ClientProto clients = 1;
22         repeated StreamProto streams = 2;
23         optional int32 server_sock = 3;
24         optional int32 port = 4;
25 };