| bt_peer_connection.hpp | | bt_peer_connection.hpp | |
| | | | |
| skipping to change at line 297 | | skipping to change at line 297 | |
| void write_pe4_sync(int crypto_select); | | void write_pe4_sync(int crypto_select); | |
| | | | |
| void write_pe_vc_cryptofield(char* write_buf, int len | | void write_pe_vc_cryptofield(char* write_buf, int len | |
| , int crypto_field, int pad_size); | | , int crypto_field, int pad_size); | |
| | | | |
| // stream key (info hash of attached torrent) | | // stream key (info hash of attached torrent) | |
| // secret is the DH shared secret | | // secret is the DH shared secret | |
| // initializes m_enc_handler | | // initializes m_enc_handler | |
| void init_pe_rc4_handler(char const* secret, sha1_hash const
& stream_key); | | void init_pe_rc4_handler(char const* secret, sha1_hash const
& stream_key); | |
| | | | |
|
| | | // Returns offset at which bytestream (src, src + src_size) | |
| | | // matches bytestream(target, target + target_size). | |
| | | // If no sync found, return -1 | |
| | | int get_syncoffset(char const* src, int src_size | |
| | | , char const* target, int target_size) const; | |
| | | #endif | |
| | | | |
| public: | | public: | |
| | | | |
| // these functions encrypt the send buffer if m_rc4_encrypte
d | | // these functions encrypt the send buffer if m_rc4_encrypte
d | |
| // is true, otherwise it passes the call to the | | // is true, otherwise it passes the call to the | |
| // peer_connection functions of the same names | | // peer_connection functions of the same names | |
| virtual void append_const_send_buffer(char const* buffer, in
t size); | | virtual void append_const_send_buffer(char const* buffer, in
t size); | |
| virtual void send_buffer(char const* begin, int size, int fl
ags = 0 | | virtual void send_buffer(char const* begin, int size, int fl
ags = 0 | |
| , void (*fun)(char*, int, void*) = 0, void* userdata
= 0); | | , void (*fun)(char*, int, void*) = 0, void* userdata
= 0); | |
| template <class Destructor> | | template <class Destructor> | |
|
| void append_send_buffer(char* buffer, int size, Destructor c
onst& destructor) | | void bt_append_send_buffer(char* buffer, int size, Destructo
r const& destructor) | |
| { | | { | |
| #ifndef TORRENT_DISABLE_ENCRYPTION | | #ifndef TORRENT_DISABLE_ENCRYPTION | |
| if (m_rc4_encrypted) | | if (m_rc4_encrypted) | |
| m_enc_handler->encrypt(buffer, size); | | m_enc_handler->encrypt(buffer, size); | |
| #endif | | #endif | |
| peer_connection::append_send_buffer(buffer, size, de
structor, true); | | peer_connection::append_send_buffer(buffer, size, de
structor, true); | |
| } | | } | |
| | | | |
| private: | | private: | |
| | | | |
|
| // Returns offset at which bytestream (src, src + src_size) | | | |
| // matches bytestream(target, target + target_size). | | | |
| // If no sync found, return -1 | | | |
| int get_syncoffset(char const* src, int src_size | | | |
| , char const* target, int target_size) const; | | | |
| #endif | | | |
| | | | |
| enum state | | enum state | |
| { | | { | |
| #ifndef TORRENT_DISABLE_ENCRYPTION | | #ifndef TORRENT_DISABLE_ENCRYPTION | |
| read_pe_dhkey = 0, | | read_pe_dhkey = 0, | |
| read_pe_syncvc, | | read_pe_syncvc, | |
| read_pe_synchash, | | read_pe_synchash, | |
| read_pe_skey_vc, | | read_pe_skey_vc, | |
| read_pe_cryptofield, | | read_pe_cryptofield, | |
| read_pe_pad, | | read_pe_pad, | |
| read_pe_ia, | | read_pe_ia, | |
| | | | |
End of changes. 3 change blocks. |
| 8 lines changed or deleted | | 8 lines changed or added | |
|
| file_storage.hpp | | file_storage.hpp | |
| | | | |
| skipping to change at line 91 | | skipping to change at line 91 | |
| internal_file_entry() | | internal_file_entry() | |
| : name(0) | | : name(0) | |
| , offset(0) | | , offset(0) | |
| , symlink_index(-1) | | , symlink_index(-1) | |
| , size(0) | | , size(0) | |
| , name_len(0) | | , name_len(0) | |
| , pad_file(false) | | , pad_file(false) | |
| , hidden_attribute(false) | | , hidden_attribute(false) | |
| , executable_attribute(false) | | , executable_attribute(false) | |
| , symlink_attribute(false) | | , symlink_attribute(false) | |
|
| | | , no_root_dir(false) | |
| , path_index(-1) | | , path_index(-1) | |
| {} | | {} | |
| | | | |
| internal_file_entry(file_entry const& e) | | internal_file_entry(file_entry const& e) | |
| : name(0) | | : name(0) | |
| , offset(e.offset) | | , offset(e.offset) | |
| , symlink_index(-1) | | , symlink_index(-1) | |
| , size(e.size) | | , size(e.size) | |
| , name_len(0) | | , name_len(0) | |
| , pad_file(e.pad_file) | | , pad_file(e.pad_file) | |
| , hidden_attribute(e.hidden_attribute) | | , hidden_attribute(e.hidden_attribute) | |
| , executable_attribute(e.executable_attribute) | | , executable_attribute(e.executable_attribute) | |
| , symlink_attribute(e.symlink_attribute) | | , symlink_attribute(e.symlink_attribute) | |
|
| | | , no_root_dir(false) | |
| , path_index(-1) | | , path_index(-1) | |
| { | | { | |
| set_name(e.path.c_str()); | | set_name(e.path.c_str()); | |
| } | | } | |
| | | | |
| internal_file_entry(internal_file_entry const& fe); | | internal_file_entry(internal_file_entry const& fe); | |
| internal_file_entry& operator=(internal_file_entry const& fe
); | | internal_file_entry& operator=(internal_file_entry const& fe
); | |
| | | | |
| ~internal_file_entry(); | | ~internal_file_entry(); | |
| | | | |
| | | | |
| skipping to change at line 148 | | skipping to change at line 150 | |
| // the number of characters in the name. If this is | | // the number of characters in the name. If this is | |
| // 0, name is null terminated and owned by this object | | // 0, name is null terminated and owned by this object | |
| // (i.e. it should be freed in the destructor). If | | // (i.e. it should be freed in the destructor). If | |
| // the len is > 0, the name pointer doesn not belong | | // the len is > 0, the name pointer doesn not belong | |
| // to this object, and it's not null terminated | | // to this object, and it's not null terminated | |
| size_type name_len:10; | | size_type name_len:10; | |
| bool pad_file:1; | | bool pad_file:1; | |
| bool hidden_attribute:1; | | bool hidden_attribute:1; | |
| bool executable_attribute:1; | | bool executable_attribute:1; | |
| bool symlink_attribute:1; | | bool symlink_attribute:1; | |
|
| | | | |
| | | // if this is true, don't include m_name as part of the | |
| | | // path to this file | |
| | | boost::uint64_t no_root_dir:1; | |
| | | | |
| // the index into file_storage::m_paths. To get | | // the index into file_storage::m_paths. To get | |
| // the full path to this file, concatenate the path | | // the full path to this file, concatenate the path | |
| // from that array with the 'name' field in | | // from that array with the 'name' field in | |
| // this struct | | // this struct | |
|
| | | // values for path_index include: | |
| | | // -1 means no path (i.e. single file torrent) | |
| int path_index; | | int path_index; | |
| }; | | }; | |
| | | | |
| struct TORRENT_EXPORT file_slice | | struct TORRENT_EXPORT file_slice | |
| { | | { | |
| int file_index; | | int file_index; | |
| size_type offset; | | size_type offset; | |
| size_type size; | | size_type size; | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 265 | | skipping to change at line 274 | |
| void optimize(int pad_file_limit = -1); | | void optimize(int pad_file_limit = -1); | |
| | | | |
| sha1_hash hash(int index) const; | | sha1_hash hash(int index) const; | |
| std::string const& symlink(int index) const; | | std::string const& symlink(int index) const; | |
| time_t mtime(int index) const; | | time_t mtime(int index) const; | |
| int file_index(int index) const; | | int file_index(int index) const; | |
| size_type file_base(int index) const; | | size_type file_base(int index) const; | |
| void set_file_base(int index, size_type off); | | void set_file_base(int index, size_type off); | |
| std::string file_path(int index) const; | | std::string file_path(int index) const; | |
| size_type file_size(int index) const; | | size_type file_size(int index) const; | |
|
| | | std::string file_name(int index) const; | |
| | | | |
| sha1_hash hash(internal_file_entry const& fe) const; | | sha1_hash hash(internal_file_entry const& fe) const; | |
| std::string const& symlink(internal_file_entry const& fe) co
nst; | | std::string const& symlink(internal_file_entry const& fe) co
nst; | |
| time_t mtime(internal_file_entry const& fe) const; | | time_t mtime(internal_file_entry const& fe) const; | |
| int file_index(internal_file_entry const& fe) const; | | int file_index(internal_file_entry const& fe) const; | |
| size_type file_base(internal_file_entry const& fe) const; | | size_type file_base(internal_file_entry const& fe) const; | |
| void set_file_base(internal_file_entry const& fe, size_type
off); | | void set_file_base(internal_file_entry const& fe, size_type
off); | |
| std::string file_path(internal_file_entry const& fe) const; | | std::string file_path(internal_file_entry const& fe) const; | |
| size_type file_size(internal_file_entry const& fe) const; | | size_type file_size(internal_file_entry const& fe) const; | |
| | | | |
| | | | |
| skipping to change at line 312 | | skipping to change at line 322 | |
| // each element corresponds to the file with the same | | // each element corresponds to the file with the same | |
| // index in m_files | | // index in m_files | |
| std::vector<time_t> m_mtime; | | std::vector<time_t> m_mtime; | |
| | | | |
| // if any file has a non-zero file base (i.e. multiple | | // if any file has a non-zero file base (i.e. multiple | |
| // files residing in the same physical file at different | | // files residing in the same physical file at different | |
| // offsets) | | // offsets) | |
| std::vector<size_type> m_file_base; | | std::vector<size_type> m_file_base; | |
| | | | |
| // all unique paths files have. The internal_file_entry::pat
h_index | | // all unique paths files have. The internal_file_entry::pat
h_index | |
|
| // points into this array | | // points into this array. The paths don't include the root | |
| | | directory | |
| | | // name for multi-file torrents. The m_name field need to be | |
| | | // prepended to these paths, and the filename of a specific | |
| | | file | |
| | | // entry appended, to form full file paths | |
| std::vector<std::string> m_paths; | | std::vector<std::string> m_paths; | |
| | | | |
| // name of torrent. For multi-file torrents | | // name of torrent. For multi-file torrents | |
| // this is always the root directory | | // this is always the root directory | |
| std::string m_name; | | std::string m_name; | |
| | | | |
| // the sum of all filesizes | | // the sum of all filesizes | |
| size_type m_total_size; | | size_type m_total_size; | |
| | | | |
| // the number of pieces in the torrent | | // the number of pieces in the torrent | |
| | | | |
End of changes. 6 change blocks. |
| 1 lines changed or deleted | | 16 lines changed or added | |
|
| i2p_stream.hpp | | i2p_stream.hpp | |
| | | | |
| skipping to change at line 64 | | skipping to change at line 64 | |
| enum i2p_error_code | | enum i2p_error_code | |
| { | | { | |
| no_error = 0, | | no_error = 0, | |
| parse_failed, | | parse_failed, | |
| cant_reach_peer, | | cant_reach_peer, | |
| i2p_error, | | i2p_error, | |
| invalid_key, | | invalid_key, | |
| invalid_id, | | invalid_id, | |
| timeout, | | timeout, | |
| key_not_found, | | key_not_found, | |
|
| | | duplicated_id, | |
| num_errors | | num_errors | |
| }; | | }; | |
| } | | } | |
| | | | |
| struct TORRENT_EXPORT i2p_error_category : boost::system::error_category | | struct TORRENT_EXPORT i2p_error_category : boost::system::error_category | |
| { | | { | |
| virtual const char* name() const BOOST_SYSTEM_NOEXCEPT; | | virtual const char* name() const BOOST_SYSTEM_NOEXCEPT; | |
| virtual std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT; | | virtual std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT; | |
| virtual boost::system::error_condition default_error_condition(int e
v) const BOOST_SYSTEM_NOEXCEPT | | virtual boost::system::error_condition default_error_condition(int e
v) const BOOST_SYSTEM_NOEXCEPT | |
| { return boost::system::error_condition(ev, *this); } | | { return boost::system::error_condition(ev, *this); } | |
| }; | | }; | |
| | | | |
| extern i2p_error_category i2p_category; | | extern i2p_error_category i2p_category; | |
| | | | |
| class i2p_stream : public proxy_base | | class i2p_stream : public proxy_base | |
| { | | { | |
| public: | | public: | |
| | | | |
|
| explicit i2p_stream(io_service& io_service) | | explicit i2p_stream(io_service& io_service); | |
| : proxy_base(io_service) | | ~i2p_stream(); | |
| , m_id(0) | | | |
| , m_command(cmd_create_session) | | | |
| , m_state(0) | | | |
| {} | | | |
| | | | |
| enum command_t | | enum command_t | |
| { | | { | |
| cmd_none, | | cmd_none, | |
| cmd_create_session, | | cmd_create_session, | |
| cmd_connect, | | cmd_connect, | |
| cmd_accept, | | cmd_accept, | |
| cmd_name_lookup, | | cmd_name_lookup, | |
| cmd_incoming | | cmd_incoming | |
| }; | | }; | |
| | | | |
| skipping to change at line 162 | | skipping to change at line 159 | |
| enum state_t | | enum state_t | |
| { | | { | |
| read_hello_response, | | read_hello_response, | |
| read_connect_response, | | read_connect_response, | |
| read_accept_response, | | read_accept_response, | |
| read_session_create_response, | | read_session_create_response, | |
| read_name_lookup_response | | read_name_lookup_response | |
| }; | | }; | |
| | | | |
| int m_state; | | int m_state; | |
|
| | | #if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS | |
| | | int m_magic; | |
| | | #endif | |
| }; | | }; | |
| | | | |
| class i2p_connection | | class i2p_connection | |
| { | | { | |
| public: | | public: | |
| i2p_connection(io_service& ios); | | i2p_connection(io_service& ios); | |
| ~i2p_connection(); | | ~i2p_connection(); | |
| | | | |
| proxy_settings const& proxy() const { return m_sam_router; } | | proxy_settings const& proxy() const { return m_sam_router; } | |
| | | | |
| | | | |
| skipping to change at line 189 | | skipping to change at line 189 | |
| void close(error_code&); | | void close(error_code&); | |
| | | | |
| char const* session_id() const { return m_session_id.c_str(); } | | char const* session_id() const { return m_session_id.c_str(); } | |
| std::string const& local_endpoint() const { return m_i2p_local_endpo
int; } | | std::string const& local_endpoint() const { return m_i2p_local_endpo
int; } | |
| | | | |
| typedef boost::function<void(error_code const&, char const*)> name_l
ookup_handler; | | typedef boost::function<void(error_code const&, char const*)> name_l
ookup_handler; | |
| void async_name_lookup(char const* name, name_lookup_handler handler
); | | void async_name_lookup(char const* name, name_lookup_handler handler
); | |
| | | | |
| private: | | private: | |
| | | | |
|
| void on_sam_connect(error_code const& ec, i2p_stream::handler_type c | | void on_sam_connect(error_code const& ec, i2p_stream::handler_type c | |
| onst& h); | | onst& h | |
| | | , boost::shared_ptr<i2p_stream>); | |
| void do_name_lookup(std::string const& name | | void do_name_lookup(std::string const& name | |
| , name_lookup_handler const& h); | | , name_lookup_handler const& h); | |
| void on_name_lookup(error_code const& ec | | void on_name_lookup(error_code const& ec | |
|
| , name_lookup_handler handler); | | , name_lookup_handler handler | |
| | | , boost::shared_ptr<i2p_stream>); | |
| | | | |
| void set_local_endpoint(error_code const& ec, char const* dest); | | void set_local_endpoint(error_code const& ec, char const* dest); | |
| | | | |
| // to talk to i2p SAM bridge | | // to talk to i2p SAM bridge | |
| boost::shared_ptr<i2p_stream> m_sam_socket; | | boost::shared_ptr<i2p_stream> m_sam_socket; | |
| proxy_settings m_sam_router; | | proxy_settings m_sam_router; | |
| | | | |
| // our i2p endpoint key | | // our i2p endpoint key | |
| std::string m_i2p_local_endpoint; | | std::string m_i2p_local_endpoint; | |
| std::string m_session_id; | | std::string m_session_id; | |
| | | | |
End of changes. 5 change blocks. |
| 9 lines changed or deleted | | 11 lines changed or added | |
|
| peer_connection.hpp | | peer_connection.hpp | |
| | | | |
| skipping to change at line 562 | | skipping to change at line 562 | |
| | | | |
| void cork_socket() { TORRENT_ASSERT(!m_corked); m_corked = t
rue; } | | void cork_socket() { TORRENT_ASSERT(!m_corked); m_corked = t
rue; } | |
| void uncork_socket(); | | void uncork_socket(); | |
| | | | |
| #ifdef TORRENT_DISK_STATS | | #ifdef TORRENT_DISK_STATS | |
| void log_buffer_usage(char* buffer, int size, char const* la
bel); | | void log_buffer_usage(char* buffer, int size, char const* la
bel); | |
| #endif | | #endif | |
| | | | |
| template <class Destructor> | | template <class Destructor> | |
| void append_send_buffer(char* buffer, int size, Destructor c
onst& destructor | | void append_send_buffer(char* buffer, int size, Destructor c
onst& destructor | |
|
| , bool encrypted = false) | | , bool encrypted) | |
| { | | { | |
| #if defined TORRENT_DISK_STATS | | #if defined TORRENT_DISK_STATS | |
| log_buffer_usage(buffer, size, "queued send buffer")
; | | log_buffer_usage(buffer, size, "queued send buffer")
; | |
| #endif | | #endif | |
| // bittorrent connections should never use this func
tion, since | | // bittorrent connections should never use this func
tion, since | |
| // they might be encrypted and this would circumvent
the actual | | // they might be encrypted and this would circumvent
the actual | |
| // encryption. bt_peer_connection overrides this fun
ction with | | // encryption. bt_peer_connection overrides this fun
ction with | |
| // its own version. | | // its own version. | |
| TORRENT_ASSERT(encrypted || type() != bittorrent_con
nection); | | TORRENT_ASSERT(encrypted || type() != bittorrent_con
nection); | |
| m_send_buffer.append_buffer(buffer, size, size, dest
ructor); | | m_send_buffer.append_buffer(buffer, size, size, dest
ructor); | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| session_impl.hpp | | session_impl.hpp | |
| | | | |
| skipping to change at line 420 | | skipping to change at line 420 | |
| void set_dht_proxy(proxy_settings const& s) { set_pr
oxy(s); } | | void set_dht_proxy(proxy_settings const& s) { set_pr
oxy(s); } | |
| proxy_settings const& dht_proxy() const { return pro
xy(); } | | proxy_settings const& dht_proxy() const { return pro
xy(); } | |
| #endif | | #endif | |
| #endif // TORRENT_NO_DEPRECATE | | #endif // TORRENT_NO_DEPRECATE | |
| | | | |
| #ifndef TORRENT_DISABLE_DHT | | #ifndef TORRENT_DISABLE_DHT | |
| bool is_dht_running() const { return m_dht.get(); } | | bool is_dht_running() const { return m_dht.get(); } | |
| #endif | | #endif | |
| | | | |
| #if TORRENT_USE_I2P | | #if TORRENT_USE_I2P | |
|
| void set_i2p_proxy(proxy_settings const& s) | | void set_i2p_proxy(proxy_settings const& s); | |
| { | | | |
| m_i2p_conn.open(s, boost::bind(&session_impl | | | |
| ::on_i2p_open, this, _1)); | | | |
| open_new_incoming_i2p_connection(); | | | |
| } | | | |
| void on_i2p_open(error_code const& ec); | | void on_i2p_open(error_code const& ec); | |
| proxy_settings const& i2p_proxy() const | | proxy_settings const& i2p_proxy() const | |
| { return m_i2p_conn.proxy(); } | | { return m_i2p_conn.proxy(); } | |
| void open_new_incoming_i2p_connection(); | | void open_new_incoming_i2p_connection(); | |
| void on_i2p_accept(boost::shared_ptr<socket_type> co
nst& s | | void on_i2p_accept(boost::shared_ptr<socket_type> co
nst& s | |
| , error_code const& e); | | , error_code const& e); | |
| #endif | | #endif | |
| | | | |
| #ifndef TORRENT_DISABLE_GEO_IP | | #ifndef TORRENT_DISABLE_GEO_IP | |
| std::string as_name_for_ip(address const& a); | | std::string as_name_for_ip(address const& a); | |
| | | | |
| skipping to change at line 531 | | skipping to change at line 527 | |
| | | | |
| void add_to_update_queue(boost::weak_ptr<torrent> t) | | void add_to_update_queue(boost::weak_ptr<torrent> t) | |
| { | | { | |
| TORRENT_ASSERT(std::find_if(m_state_updates.
begin(), m_state_updates.end() | | TORRENT_ASSERT(std::find_if(m_state_updates.
begin(), m_state_updates.end() | |
| , boost::bind(&boost::weak_ptr<torre
nt>::lock, _1) == t.lock()) == m_state_updates.end()); | | , boost::bind(&boost::weak_ptr<torre
nt>::lock, _1) == t.lock()) == m_state_updates.end()); | |
| m_state_updates.push_back(t); | | m_state_updates.push_back(t); | |
| } | | } | |
| | | | |
| // private: | | // private: | |
| | | | |
|
| | | void trigger_auto_manage(); | |
| | | | |
| void update_connections_limit(); | | void update_connections_limit(); | |
| void update_unchoke_limit(); | | void update_unchoke_limit(); | |
| void update_rate_settings(); | | void update_rate_settings(); | |
| | | | |
| void update_disk_thread_settings(); | | void update_disk_thread_settings(); | |
| void on_lsd_peer(tcp::endpoint peer, sha1_hash const
& ih); | | void on_lsd_peer(tcp::endpoint peer, sha1_hash const
& ih); | |
| void setup_socket_buffers(socket_type& s); | | void setup_socket_buffers(socket_type& s); | |
| | | | |
| // the settings for the client | | // the settings for the client | |
| session_settings m_settings; | | session_settings m_settings; | |
| | | | |
End of changes. 2 change blocks. |
| 6 lines changed or deleted | | 3 lines changed or added | |
|
| socket_type.hpp | | socket_type.hpp | |
| | | | |
| skipping to change at line 307 | | skipping to change at line 307 | |
| | | | |
| size_type m_data[(storage_size + sizeof(size_type) - 1) / si
zeof(size_type)]; | | size_type m_data[(storage_size + sizeof(size_type) - 1) / si
zeof(size_type)]; | |
| }; | | }; | |
| | | | |
| // returns true if this socket is an SSL socket | | // returns true if this socket is an SSL socket | |
| bool is_ssl(socket_type const& s); | | bool is_ssl(socket_type const& s); | |
| | | | |
| // returns true if this is a uTP socket | | // returns true if this is a uTP socket | |
| bool is_utp(socket_type const& s); | | bool is_utp(socket_type const& s); | |
| | | | |
|
| | | #if TORRENT_USE_I2P | |
| | | // returns true if this is an i2p socket | |
| | | bool is_i2p(socket_type const& s); | |
| | | #endif | |
| | | | |
| // assuming the socket_type s is an ssl socket, make sure it | | // assuming the socket_type s is an ssl socket, make sure it | |
| // verifies the hostname in its SSL handshake | | // verifies the hostname in its SSL handshake | |
| void setup_ssl_hostname(socket_type& s, std::string const& hostname,
error_code& ec); | | void setup_ssl_hostname(socket_type& s, std::string const& hostname,
error_code& ec); | |
| | | | |
| // properly shuts down SSL sockets. holder keeps s alive | | // properly shuts down SSL sockets. holder keeps s alive | |
| void async_shutdown(socket_type& s, boost::shared_ptr<void> holder); | | void async_shutdown(socket_type& s, boost::shared_ptr<void> holder); | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 5 lines changed or added | |
|
| tracker_manager.hpp | | tracker_manager.hpp | |
| | | | |
| skipping to change at line 191 | | skipping to change at line 191 | |
| timeout_handler(io_service& str); | | timeout_handler(io_service& str); | |
| | | | |
| void set_timeout(int completion_timeout, int read_timeout); | | void set_timeout(int completion_timeout, int read_timeout); | |
| void restart_read_timeout(); | | void restart_read_timeout(); | |
| void cancel(); | | void cancel(); | |
| bool cancelled() const { return m_abort; } | | bool cancelled() const { return m_abort; } | |
| | | | |
| virtual void on_timeout(error_code const& ec) = 0; | | virtual void on_timeout(error_code const& ec) = 0; | |
| virtual ~timeout_handler() {} | | virtual ~timeout_handler() {} | |
| | | | |
|
| | | io_service& get_io_service() { return m_timeout.get_io_servi | |
| | | ce(); } | |
| | | | |
| #if !defined TORRENT_VERBOSE_LOGGING \ | | #if !defined TORRENT_VERBOSE_LOGGING \ | |
| && !defined TORRENT_LOGGING \ | | && !defined TORRENT_LOGGING \ | |
| && !defined TORRENT_ERROR_LOGGING | | && !defined TORRENT_ERROR_LOGGING | |
| // necessary for logging member offsets | | // necessary for logging member offsets | |
| private: | | private: | |
| #endif | | #endif | |
| | | | |
| void timeout_callback(error_code const&); | | void timeout_callback(error_code const&); | |
| | | | |
| boost::intrusive_ptr<timeout_handler> self() | | boost::intrusive_ptr<timeout_handler> self() | |
| | | | |
| skipping to change at line 232 | | skipping to change at line 234 | |
| tracker_connection(tracker_manager& man | | tracker_connection(tracker_manager& man | |
| , tracker_request const& req | | , tracker_request const& req | |
| , io_service& ios | | , io_service& ios | |
| , boost::weak_ptr<request_callback> r); | | , boost::weak_ptr<request_callback> r); | |
| | | | |
| boost::shared_ptr<request_callback> requester() const; | | boost::shared_ptr<request_callback> requester() const; | |
| virtual ~tracker_connection() {} | | virtual ~tracker_connection() {} | |
| | | | |
| tracker_request const& tracker_req() const { return m_req; } | | tracker_request const& tracker_req() const { return m_req; } | |
| | | | |
|
| void fail_disp(error_code ec) { fail(ec); } | | | |
| void fail(error_code const& ec, int code = -1, char const* m
sg = "" | | void fail(error_code const& ec, int code = -1, char const* m
sg = "" | |
| , int interval = 0, int min_interval = 0); | | , int interval = 0, int min_interval = 0); | |
| virtual void start() = 0; | | virtual void start() = 0; | |
| virtual void close(); | | virtual void close(); | |
| address const& bind_interface() const { return m_req.bind_ip
; } | | address const& bind_interface() const { return m_req.bind_ip
; } | |
| void sent_bytes(int bytes); | | void sent_bytes(int bytes); | |
| void received_bytes(int bytes); | | void received_bytes(int bytes); | |
| virtual bool on_receive(error_code const& ec, udp::endpoint
const& ep | | virtual bool on_receive(error_code const& ec, udp::endpoint
const& ep | |
| , char const* buf, int size) { return false; } | | , char const* buf, int size) { return false; } | |
| virtual bool on_receive_hostname(error_code const& ec, char
const* hostname | | virtual bool on_receive_hostname(error_code const& ec, char
const* hostname | |
| , char const* buf, int size) { return false; } | | , char const* buf, int size) { return false; } | |
| | | | |
|
| | | boost::intrusive_ptr<tracker_connection> self() | |
| | | { return boost::intrusive_ptr<tracker_connection>(this); } | |
| | | | |
| #if !defined TORRENT_VERBOSE_LOGGING \ | | #if !defined TORRENT_VERBOSE_LOGGING \ | |
| && !defined TORRENT_LOGGING \ | | && !defined TORRENT_LOGGING \ | |
| && !defined TORRENT_ERROR_LOGGING | | && !defined TORRENT_ERROR_LOGGING | |
| // necessary for logging member offsets | | // necessary for logging member offsets | |
| protected: | | protected: | |
| #endif | | #endif | |
| | | | |
|
| | | void fail_impl(error_code const& ec, int code = -1, std::str | |
| | | ing msg = std::string() | |
| | | , int interval = 0, int min_interval = 0); | |
| | | | |
| boost::weak_ptr<request_callback> m_requester; | | boost::weak_ptr<request_callback> m_requester; | |
| | | | |
| tracker_manager& m_man; | | tracker_manager& m_man; | |
| | | | |
| #if !defined TORRENT_VERBOSE_LOGGING \ | | #if !defined TORRENT_VERBOSE_LOGGING \ | |
| && !defined TORRENT_LOGGING \ | | && !defined TORRENT_LOGGING \ | |
| && !defined TORRENT_ERROR_LOGGING | | && !defined TORRENT_ERROR_LOGGING | |
| // necessary for logging member offsets | | // necessary for logging member offsets | |
| private: | | private: | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 10 lines changed or added | |
|
| version.hpp | | version.hpp | |
| | | | |
| skipping to change at line 38 | | skipping to change at line 38 | |
| ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| POSSIBILITY OF SUCH DAMAGE. | | POSSIBILITY OF SUCH DAMAGE. | |
| | | | |
| */ | | */ | |
| | | | |
| #ifndef TORRENT_VERSION_HPP_INCLUDED | | #ifndef TORRENT_VERSION_HPP_INCLUDED | |
| #define TORRENT_VERSION_HPP_INCLUDED | | #define TORRENT_VERSION_HPP_INCLUDED | |
| | | | |
| #define LIBTORRENT_VERSION_MAJOR 0 | | #define LIBTORRENT_VERSION_MAJOR 0 | |
| #define LIBTORRENT_VERSION_MINOR 16 | | #define LIBTORRENT_VERSION_MINOR 16 | |
|
| #define LIBTORRENT_VERSION_TINY 12 | | #define LIBTORRENT_VERSION_TINY 13 | |
| | | | |
| // the format of this version is: MMmmtt | | // the format of this version is: MMmmtt | |
| // M = Major version, m = minor version, t = tiny version | | // M = Major version, m = minor version, t = tiny version | |
| #define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTO
RRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY) | | #define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTO
RRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY) | |
| | | | |
|
| #define LIBTORRENT_VERSION "0.16.12.0" | | #define LIBTORRENT_VERSION "0.16.13.0" | |
| #define LIBTORRENT_REVISION "$Rev: 9199 $" | | #define LIBTORRENT_REVISION "$Rev: 9412 $" | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|