Commit Graph

95 Commits

Author SHA1 Message Date
arvidn 8be7ab559a remove outgoing udp sockets and replace with listen_socket_t 2020-01-19 08:27:33 +01:00
arvidn df85b31490 deprecate and remvoe broadcast_lsd setting 2020-01-16 16:02:00 +01:00
arvidn bd43c9b83f remove unused overload of set_external_address 2020-01-15 19:53:52 +01:00
Arvid Norberg 57e56d5070 factor out logic around adding torrents to the session into insert_torrent() 2019-03-03 12:56:24 +01:00
arvidn 0c76a3a0c5 require tracker_request objects be moved into queue_manager. also replace non-const reference parameter with rvalue reference 2018-11-14 17:09:04 +01:00
Steven Siloti 92f1937b97 fix typo in #if tests for TORRENT_DISABLE_ENCRYPTION 2018-07-29 09:04:16 +02:00
Arvid Norberg b3856d3027 narrow the scope affected by TORRENT_DISABLE_EXTENSIONS to only disable the user extensions, but always support the extension message and the built-in extensions, like lt_donthave and seed_mode 2018-07-26 09:31:49 +02:00
Steven Siloti e5be30157f set port in handshake based on source address (#3172) 2018-07-15 21:15:04 +02:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00
arvidn ddd1168296 don't attempt to make uTP connections if we don't have any outgoing UDP sockets 2018-05-12 13:34:58 +02:00
arvidn 5413eae900 declare tag types in-line 2018-03-23 11:21:08 +01:00
arvidn e126d7bce0 move socket_type into aux-namespace 2018-01-29 08:33:45 +01:00
arvidn a33c81ad33 shave down session_interface by one function, reduce the dependencies between torrent and session 2018-01-29 03:00:59 +01:00
arvidn 4fef787212 merged RC_1_1 into master 2018-01-24 00:37:05 +01:00
arvidn efd096d879 use unique peer_ids per connection 2018-01-23 16:40:16 +01:00
arvidn c1abafc0cc reserve space in the undead peers list up-front, to not have to allocate memory when disconnecting 2017-12-27 21:24:16 +01:00
arvidn 5e7666526e fix IPv6 tracker announce issue 2017-11-23 10:11:59 +01:00
arvidn 0378ae47f4 fix some macro expansions of 'max' in headers, to improve compatibility with windows.h 2017-11-12 23:01:47 +01:00
arvidn b6a73eeaaa simplify trigger_unchoke and trigger_optimistic_unchoke on session_impl, abd make them noexcept 2017-11-12 15:48:46 +01:00
arvidn f57b90b500 introduce type for torrent queue_position 2017-11-01 10:52:45 +01:00
arvidn 9e69bf3618 introduce a type to refer to a torrent-list-index, to improve type safety 2017-10-25 13:39:37 +02:00
arvidn 9111d5977e make the variables holding the source of external IPs type-safe 2017-10-10 22:38:36 +02:00
Arvid Norberg 60b74d2616 merged RC_1_1 into master 2017-10-10 14:25:12 +02:00
Arvid Norberg 830ef0bedd prevent dependency on openssl from leaking outside of libtorrent (libssl and libcrypto should not be a usage requirement). This cleans up most tests to build without having to also link against openssl 2017-10-09 17:15:35 +02:00
arvidn 1d15e6bfb4 merge RC_1_1 into master 2017-10-08 18:21:25 +02:00
arvidn cdd9f91999 fix leak of torrent_peer objecs (entries in peer_list) 2017-10-07 11:43:42 +02:00
arvidn 93bb84d94c some random cleanup 2017-09-13 08:28:46 +02:00
Steven Siloti df8a57efb7 select which DHT port to report based on the connection's local endpoint (#2316) 2017-09-10 10:25:04 +02:00
Arvid Norberg 1075ae3b8d remove session pool allocator and use the buffer class instead (#2274)
simplify append_buffer by using size() to determine size of the buffer. make the move explicit in chained_buffer::init_buffer_entry
2017-08-28 11:37:53 +02:00
arvidn e92cbf502c remove the last use of session_impl get_ipv6_interface and get_ipv4_interface 2017-08-23 21:01:15 +02:00
arvidn 322007bb6a make save_state_flags a strong type 2017-07-30 09:06:41 -07:00
Steven Siloti f0ae2145ea use a handle class for listen sockets instead of raw pointers
Listen socket handles need to be week_ptr so that they can detect when a listen
socket is removed in the middle of a tracker announce on it. Use a wrapper class
to enforce that no one outside of session_impl can hold ownership of the socket
across event boundaries.

To support unit tests, listen_socket_t is also split into a base class which
holds the members needed to support the public listen socket API.
2017-07-21 19:18:44 -07:00
Steven Siloti fd50630020 announce to trackers for all listen interfaces 2017-04-30 08:11:56 -04:00
Steven Siloti cdd50be859 create a separate DHT node for each listen socket 2017-04-23 19:49:49 -04:00
arvidn 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -04:00
Alden Torres 990756ca38 code cleanup related to async_resolve (#1873) 2017-03-30 23:00:59 -04:00
arvidn 7640c0641e optimize download queue management with an explicit queue 2017-03-25 20:47:33 -04:00
Arvid Norberg 7d3a8f5b19 don't remove peers from the connection list immediately when disconnecting (#1782)
don't remove peers from the connection list immediately when disconnecting them, but defer it until later. This makes it less error prone to disconnect peers in loops over the connections
2017-03-07 13:50:03 -05:00
Alden Torres 1874a917b0 added std:: prefix, end of file cleanup, formatting, consts 2017-01-14 05:59:26 -05:00
Alden Torres a31ba7972d fixing sign-conversion warnings, part 3 (#1537)
fixing sign-conversion warnings, part 3. making aux::vector index type default to int
2017-01-13 01:55:29 -05:00
Arvid Norberg af126fe507 make buffer_allocator_interface an implementation detail of the disk_io_thread (#1463)
make buffer_allocator_interface an implementation detail of the disk_io_thread by using disk_buffer_holder in the disk interface. make chained_buffer use holders instead of free deleter functions and userdata to support putting disk_buffer_holder objects in there. Also make the session buffers be held by holders
2016-12-28 17:47:18 -08:00
Steven Siloti b9169609df support separate external ip for each interface (#1383)
support separate external ip for each interface
2016-12-04 15:58:51 -05:00
arvidn d5b76d2237 move block_cache_reference out of disk_io_job header 2016-11-20 10:34:42 -05:00
arvidn c9333849e6 deprecate relative times in torrent_status, replaced by std::chrono::time_point 2016-11-12 17:37:10 -05:00
Arvid Norberg 8daa200d11 simplify interaction with disk_io_thread by removing the uncork interface (#1271)
simplify the interaction with the disk_io_thread by removing the uncork interface. This should be turned into a transparent part of peer_connection instead and remove cork logic from peer_connection
2016-10-30 18:21:07 -04:00
Arvid Norberg c18c12a144 remove ghost torrent/torrent eviction feature. (#1214)
remove ghost torrent/torrent eviction feature. It was very complex and did not solve the problem very well
2016-10-15 13:32:59 -04:00
Alden Torres acf353e26a general session, torrent and peer connection log optimization (#1088)
general session, torrent and peer connection log optimization
2016-09-13 22:46:07 -04:00
Alden Torres 5480e2eedc some consts refs and refactor (#1075)
some consts refs and refactor
2016-09-09 15:02:20 -04:00
Alden Torres bf0008933a refactor to use std::shared_ptr with peer_connection, core and tests (#1050) 2016-08-31 21:42:18 -04:00
Alden Torres cdb15ba886 refactor to use std::shared_ptr with torrent (#1048) 2016-08-31 08:27:36 -04:00