]> git.sesse.net Git - cubemap/blob - state.proto
Remove some code for pre-1.1.3 deserialization compatibility.
[cubemap] / state.proto
1 syntax = "proto2";
2
3 // Corresponds to struct Client.
4 message ClientProto {
5         optional int32 sock = 1;
6         optional string remote_addr = 8;
7         optional int64 connect_time_sec = 13;
8         optional int32 connect_time_nsec = 14;
9         optional int32 state = 2;
10         optional bytes request = 3;
11         optional string url = 4;
12         optional bytes header_or_short_response = 5;
13         optional int64 header_or_short_response_bytes_sent = 6;
14         optional int64 stream_pos = 7;
15         optional int64 bytes_sent = 10;
16         optional int64 bytes_lost = 11;
17         optional int64 num_loss_events = 12;
18         optional bytes referer = 15;
19         optional bytes user_agent = 16;
20 };
21
22 // Corresponds to struct Stream.
23 message StreamProto {
24         optional bytes http_header = 6;
25         optional bytes stream_header = 7;
26         repeated int32 data_fds = 8;
27         optional int64 backlog_size = 5 [default=10485760];
28         optional int64 prebuffering_bytes = 10 [default=0];
29         optional int64 bytes_received = 3;
30         repeated int64 suitable_starting_point = 9;
31         optional string url = 4;
32 };
33
34 // Corresponds to class Input.
35 message InputProto {
36         optional int32 state = 1;
37         optional string url = 3;
38         optional bytes request = 4;
39         optional int32 request_bytes_sent = 5;
40         optional bytes response = 6;
41         optional bytes http_header = 10;
42         optional bytes stream_header = 14;
43         optional bytes pending_data = 7;
44         optional bool has_metacube_header = 8;
45         optional int32 sock = 9;
46         optional int64 bytes_received = 11;
47         optional int64 data_bytes_received = 12;
48         optional int64 metadata_bytes_received = 16;
49         optional double latency_sec = 17;
50         optional int64 connect_time = 13;
51         optional bool is_metacube_encoded = 15 [default=true];
52 };
53
54 // Corresponds to class Acceptor.
55 message AcceptorProto {
56         optional int32 server_sock = 1;
57         optional int32 port = 2;
58         optional string addr = 3;  // As a string. Empty is equivalent to "::".
59 };
60
61 message CubemapStateProto {
62         optional int64 serialize_start_sec = 6;
63         optional int64 serialize_start_usec = 7;
64         repeated ClientProto clients = 1;
65         repeated StreamProto streams = 2;
66         repeated InputProto inputs = 5;
67         repeated AcceptorProto acceptors = 8;
68 };