]> git.sesse.net Git - cubemap/blob - state.proto
Reset the list of suitable starting points when changing header.
[cubemap] / state.proto
1 // Corresponds to struct Client.
2 message ClientProto {
3         optional int32 sock = 1;
4         optional string remote_addr = 8;
5         optional int64 connect_time_old = 9;  // Contains a time_t from time(). For versions prior to 1.1.3.
6         optional int64 connect_time_sec = 13;
7         optional int32 connect_time_nsec = 14;
8         optional int32 state = 2;
9         optional bytes request = 3;
10         optional string url = 4;
11         optional bytes header_or_error = 5;
12         optional int64 header_or_error_bytes_sent = 6;
13         optional int64 stream_pos = 7;
14         optional int64 bytes_sent = 10;
15         optional int64 bytes_lost = 11;
16         optional int64 num_loss_events = 12;
17         optional bytes referer = 15;
18         optional bytes user_agent = 16;
19 };
20
21 // Corresponds to struct Stream.
22 message StreamProto {
23         optional bytes http_header = 6;
24         optional bytes stream_header = 7;
25         repeated int32 data_fds = 8;
26         optional int64 backlog_size = 5 [default=10485760];
27         optional int64 prebuffering_bytes = 10 [default=0];
28         optional int64 bytes_received = 3;
29         repeated int64 suitable_starting_point = 9;
30         optional string url = 4;
31 };
32
33 // Corresponds to class Input.
34 message InputProto {
35         optional int32 state = 1;
36         optional string url = 3;
37         optional bytes request = 4;
38         optional int32 request_bytes_sent = 5;
39         optional bytes response = 6;
40         optional bytes http_header = 10;
41         optional bytes stream_header = 14;
42         optional bytes pending_data = 7;
43         optional bool has_metacube_header = 8;
44         optional int32 sock = 9;
45         optional int64 bytes_received = 11;
46         optional int64 data_bytes_received = 12;
47         optional int64 connect_time = 13;
48 };
49
50 // Corresponds to class Acceptor.
51 message AcceptorProto {
52         optional int32 server_sock = 1;
53         optional int32 port = 2;
54         optional string addr = 3;  // As a string. Empty is equivalent to "::".
55 };
56
57 message CubemapStateProto {
58         optional int64 serialize_start_sec = 6;
59         optional int64 serialize_start_usec = 7;
60         repeated ClientProto clients = 1;
61         repeated StreamProto streams = 2;
62         repeated InputProto inputs = 5;
63         repeated AcceptorProto acceptors = 8;
64 };