~ubuntu-branches/ubuntu/maverick/libtorrent-rasterbar/maverick

« back to all changes in this revision

Viewing changes to include/libtorrent/peer_info.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Sauthier
  • Date: 2010-08-10 12:59:37 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100810125937-jbcmmf17y8yo9hgz
Tags: 0.15.0-0ubuntu1
* New upstream version.
* debian/patches/100_fix_html_docs.patch: refreshed.
* debian/control: bump up standards-version to 3.9.1 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
                int source;
81
81
 
82
82
                // bw_idle: the channel is not used
83
 
                // bw_torrent: the channel is waiting for torrent quota
84
 
                // bw_global: the channel is waiting for global quota
 
83
                // bw_limit: the channel is waiting for quota
85
84
                // bw_network: the channel is waiting for an async write
86
85
                //   for read operation to complete
87
 
                enum bw_state { bw_idle, bw_torrent, bw_global, bw_network };
 
86
                // bw_disk: the peer is waiting for the disk io thread
 
87
                //   to catch up
 
88
                enum bw_state { bw_idle, bw_limit, bw_network, bw_disk };
 
89
#ifndef TORRENT_NO_DEPRECATE
 
90
                enum bw_state_deprecated { bw_torrent = bw_limit, bw_global = bw_limit };
 
91
#endif
88
92
 
89
93
                char read_state;
90
94
                char write_state;
91
95
                
92
96
                tcp::endpoint ip;
93
 
                float up_speed;
94
 
                float down_speed;
95
 
                float payload_up_speed;
96
 
                float payload_down_speed;
 
97
                int up_speed;
 
98
                int down_speed;
 
99
                int payload_up_speed;
 
100
                int payload_down_speed;
97
101
                size_type total_download;
98
102
                size_type total_upload;
99
103
                peer_id pid;
107
111
                // time since last download or upload
108
112
                time_duration last_active;
109
113
 
 
114
                // the time until all blocks in the request
 
115
                // queue will be d
 
116
                time_duration download_queue_time;
 
117
                int queue_bytes;
 
118
 
110
119
                // the number of seconds until the current
111
120
                // pending request times out
112
121
                int request_timeout;
175
184
                enum
176
185
                {
177
186
                        standard_bittorrent = 0,
178
 
                        web_seed = 1
 
187
                        web_seed = 1,
 
188
                        http_seed = 2
179
189
                };
180
190
                int connection_type;
181
191
                
193
203
                // estimated rtt to peer, in milliseconds
194
204
                int rtt;
195
205
 
 
206
                // the number of pieces this peer has
 
207
                int num_pieces;
 
208
 
196
209
                // the highest transfer rates seen for this peer
197
210
                int download_rate_peak;
198
211
                int upload_rate_peak;
199
212
                
200
213
                // the peers progress
201
 
                float progress;
 
214
                float progress; // [0, 1]
 
215
                int progress_ppm; // [0, 1000000]
202
216
        };
203
217
 
204
218
        struct TORRENT_EXPORT peer_list_entry
213
227
                boost::uint8_t failcount;
214
228
                boost::uint8_t source;
215
229
        };
 
230
 
 
231
        // defined in policy.cpp
 
232
        int source_rank(int source_bitmask);
216
233
}
217
234
 
218
235
#endif // TORRENT_PEER_INFO_HPP_INCLUDED