Commit Graph

371 Commits

Author SHA1 Message Date
Arvid Norberg f1d981254a added session::set_alert_dispatch() for system specific message loop integration 2008-12-15 07:12:08 +00:00
Arvid Norberg 0638251289 added queued bytes to bandwidth manager and session_stats 2008-12-13 05:12:12 +00:00
Arvid Norberg 09b3a865ef fixed compiler flags in pkg-config file and made header files not depend on the NDEBUG define 2008-11-29 21:33:21 +00:00
Arvid Norberg 723aba6c24 solved issue with pausing checking torrents. Introduced a new state, checkin_resume_data, which a torrent is in while waiting for the disk io thread to verify the resume data, but before it has been determined wheter it should be queued for checking or not 2008-11-19 00:46:48 +00:00
Arvid Norberg 78abf8a340 made recent change where the TCP/IP overhead is take into account when rate limiting, optional 2008-11-18 11:14:44 +00:00
Arvid Norberg a48ffe36e0 improved natpmp logging and handling of mapped ports in session 2008-11-16 02:11:04 +00:00
Arvid Norberg 473f75e98a DHT fix where the node_id would get set after it was started and be inconsitent with rpc_manager and routing_table 2008-11-11 08:33:34 +00:00
Arvid Norberg 4abd27b40e initialize torrent object in libtorrent thread instead of in calling thread 2008-11-10 02:33:39 +00:00
Arvid Norberg 18d269dd62 DHT optimizations 2008-11-10 02:08:42 +00:00
Arvid Norberg 19c66a1826 exception fixes 2008-11-05 05:39:18 +00:00
Arvid Norberg f2c9e02994 fixed deadlock in dht code 2008-11-02 10:01:04 +00:00
Arvid Norberg d721e99026 fix windows build with verbose logging 2008-11-01 05:35:41 +00:00
Arvid Norberg 4dada930ac made torrents not wanting more peers whene they're shutting down. Closes out all connections in the connection queue explicitly when session is shutting down 2008-10-30 17:13:10 +00:00
Arvid Norberg 7fd2fd4732 added performance warnings for when the IP overhead eats up the entire up- or download rate limit 2008-10-28 06:45:42 +00:00
Arvid Norberg efcaee9c2d fix for when DHT is started before a listen port has been configured 2008-10-27 03:45:08 +00:00
Arvid Norberg 65c4b7ec13 fix for when removing a torrent when it is in the checking state 2008-10-26 09:23:00 +00:00
Arvid Norberg 8f7a3ddfe0 fix bug for when a torrent queued for checking was removed 2008-10-26 04:10:27 +00:00
Arvid Norberg 49c01d7754 moved UPNP_LOGGING out of upnp.cpp and added alerts for when upnp logs something 2008-10-22 01:12:14 +00:00
Arvid Norberg 54eb378a1e simplified is_active() function 2008-10-19 04:31:33 +00:00
Arvid Norberg f04e9e9875 made unchoke interval depend on piece size 2008-10-18 22:35:10 +00:00
Arvid Norberg 3d75732145 changed variant_stream to return a pointer instead of a reference when querying for underlying type (avoids exceptions) 2008-10-18 07:12:04 +00:00
Arvid Norberg cac6132aae don't resume a torrent if there aren't enough upload slots 2008-10-14 07:41:05 +00:00
Arvid Norberg fdadccf7a2 asserts for unchoke slot handling 2008-10-14 02:03:54 +00:00
Arvid Norberg 5710cdebf4 make auto-unchoke less likely to open up slots when maxed out 2008-10-14 00:56:44 +00:00
Arvid Norberg b355541a7d applied patch from Sergei Vorobyov to allow changing the limit on outstanding alerts 2008-10-07 05:46:42 +00:00
Arvid Norberg 1092c558e4 counts newly started torrents as active up to 2 minutes, to give them a chance to start downloading. Active torrents are not considered slow in the auto manager. 2008-10-01 05:25:18 +00:00
Arvid Norberg 195521db65 prevent new connections when shutting down 2008-09-30 01:14:27 +00:00
Arvid Norberg a3751cfcbe fixed bug in peer_connection::incoming_piece() in case blocks were skipped. Fixed warnings. 2008-09-25 20:12:53 +00:00
Arvid Norberg 1ac3b8298c report tracker bandwidth usage and include it in rate limiter 2008-09-22 00:15:05 +00:00
Arvid Norberg de2859d9b0 fixed incorrect assert 2008-09-21 23:23:52 +00:00
Arvid Norberg ea578a6acf adds ut_pex, ut_metadata and smart_ban by default in session constructor. Also starts upnp and nat-pmp by default. Fixes #399 2008-09-21 23:19:58 +00:00
Arvid Norberg 0338510b9b added more bandwidth monitoring of DHT and TCP/IP overhead. added monitoring of the running DHT lookups 2008-09-20 17:42:25 +00:00
Arvid Norberg cc67830faf support max_upload_slots of 0. #395 2008-09-06 21:16:04 +00:00
Arvid Norberg c88071ae10 fixed race when adding router nodes to the dht (router nodes should be added before it's started) 2008-09-02 06:37:40 +00:00
Arvid Norberg 0074b10b88 fix optimistic unchoke when there is no metadata 2008-09-02 05:54:05 +00:00
Arvid Norberg e670b2fa7f fixed indentation 2008-08-29 00:44:55 +00:00
Arvid Norberg 9625648026 filter loopback and local network IPs as external addresses. Re-open main_session.log when changing port (to create it in the right folder). Use a listen socket queue length of 5 instead of 0. It seemed like 0 meant 0 instead of OS chooses 2008-08-25 21:17:24 +00:00
Arvid Norberg 49e76f510f stop scraping torrents when session is paused 2008-07-19 07:45:15 +00:00
Arvid Norberg 72b99059e7 optimized policy::peer 2008-07-14 11:15:35 +00:00
Arvid Norberg c5af2c2eaf moved tracker announces into a timer instead of polling every second. Added state to properly send complete, started and stopped events 2008-07-12 08:25:19 +00:00
Arvid Norberg 486fb1082d reports event in tracker_announce_alert 2008-07-11 12:00:29 +00:00
Arvid Norberg 96ca475652 added redundant and failed byte counters to session 2008-07-11 07:30:04 +00:00
Arvid Norberg d2c53b50d5 timeout incoming connections 2008-07-10 10:35:11 +00:00
Arvid Norberg e576babbb8 changed the alerts to have categories and to be filtered with a bitmask instead of having a severity and be filtered by a severity level. 2008-07-06 12:22:56 +00:00
Andrew Resch 94cbac20cd Do not count downloads as seeds in the queue system. 2008-07-01 21:07:18 +00:00
Arvid Norberg d396ab7b17 added pause and resume to the session. Fixes #349 2008-06-29 19:08:30 +00:00
Arvid Norberg d1b2cd558e moved peer time out logic to second tick 2008-06-29 05:35:48 +00:00
cg25 ff3e80c42f Removed svn:executable property from {c,h}pp files in branches/RC_0_13 and
trunk.
2008-06-25 14:15:21 +00:00
Arvid Norberg 84221e05f8 checking torrents fix when aborting session 2008-06-24 12:17:42 +00:00
Andrew Resch 402da3c77c Make active_limit == -1 mean unlimited 2008-06-22 22:49:18 +00:00
Arvid Norberg 0f0ea269bc added an active torrent limit 2008-06-21 12:31:28 +00:00
Arvid Norberg d0e579826c added an option to not count inactive torrents against the limits for auto managed torrents 2008-06-21 09:15:29 +00:00
Arvid Norberg 7fe6c474ce fix auto manage bug related to checking torrents 2008-06-18 13:02:03 +00:00
Andrew Resch d70ec645d7 Make 'active_seeds' and 'active_downloads' use -1 as unlimited 2008-06-17 15:44:04 +00:00
Arvid Norberg b55670aa14 fixed typo 2008-06-16 22:33:42 +00:00
Arvid Norberg 6c24bd0774 moves force checked torrents to the end of the queue. Fixes #350 2008-06-16 22:27:14 +00:00
Arvid Norberg 7df5d4a9c6 changed queuing logic 2008-06-13 05:11:36 +00:00
Arvid Norberg 5923ef5b43 fixed file check ordering to respect the queue position. Fixes #350 2008-06-12 21:22:24 +00:00
Arvid Norberg 6db61166be recalculate queued torrents sooner when changing queuing settings 2008-06-12 06:58:42 +00:00
Arvid Norberg 31c9d378f5 completed queuing. It is now possible to change and query queue position of torrents. 2008-05-29 03:37:19 +00:00
Arvid Norberg 3910fe78de separated file_storage from torrent_info and create_torrent 2008-05-28 08:44:40 +00:00
Arvid Norberg 67354421fb introduced an error state for torrents. Torrents with an error are not restarted automatically 2008-05-20 07:57:44 +00:00
Arvid Norberg 777954ab3e automatically scrape auto managed torrents to keep track of downloader/seed ratio 2008-05-19 04:06:25 +00:00
Arvid Norberg c460704a5f streamlined class footprint by reducing padding 2008-05-19 02:52:32 +00:00
Arvid Norberg f296d5a64d limits the number of connections depending to getrlimit(). Fixes #232 2008-05-16 15:19:38 +00:00
Arvid Norberg f259e34f86 peer_connection fix for incoming connections 2008-05-12 10:10:39 +00:00
Arvid Norberg 068adcd9a9 indentation fix 2008-05-12 06:03:31 +00:00
Arvid Norberg f2ac4db1af changed the optimistic disconnect logic to be more efficient and configurable 2008-05-12 05:17:11 +00:00
Arvid Norberg bbf9c83edc initial support for icmp errors in the DHT 2008-05-08 00:22:17 +00:00
Arvid Norberg 73ef60e5fa seed rank fix 2008-05-07 08:24:16 +00:00
Arvid Norberg 9429ca4b1f replaced seed cycles with seed rank 2008-05-06 18:03:41 +00:00
Arvid Norberg e09457e4ab take an estimate of the IP ACK traffic into account when rate limiting (allows setting rate limits closer to the capacity) 2008-05-05 17:08:14 +00:00
Arvid Norberg c7e6c04705 switched over to asio from boost-1.35 2008-05-03 16:05:42 +00:00
Arvid Norberg 4d59d9eabc fix build with DHT disabled 2008-04-24 16:57:22 +00:00
Arvid Norberg c043d4b21d initial support for queuing 2008-04-24 03:28:48 +00:00
Arvid Norberg 7a432786e7 added url to tracker alerts. introduced a base class for all tracker alerts 2008-04-23 01:54:21 +00:00
Andrew Resch 05c1a64c76 Move the torrent_checked alert post to torrent::files_checked 2008-04-23 01:01:00 +00:00
Arvid Norberg 9a434a919f some more ASNum additions 2008-04-22 00:05:23 +00:00
Arvid Norberg 779b006ac0 fixed missing torrent_checked_alert 2008-04-16 07:02:39 +00:00
Arvid Norberg 43d5781638 port mapping fix 2008-04-13 19:19:22 +00:00
Arvid Norberg 42f55adcce support for country lookup through GeoIP 2008-04-11 08:46:43 +00:00
Arvid Norberg 093d912e9a receive buffer optimization. added receive_buffer_size and used_receive_buffer to peer_info. changed plugin api to make use of new disk_buffer_holder type 2008-04-10 10:03:23 +00:00
Arvid Norberg 291ef2a2c9 optimized torrent_handle to use a weak_ptr directly to the torrent object 2008-04-09 20:09:36 +00:00
Arvid Norberg 75ef4ec1f1 added option to not use pool allocators (useful when using memory debugging tools) 2008-04-09 05:19:11 +00:00
Arvid Norberg 9fe5bb7a7d removed dependencies on exceptions from session_impl 2008-04-07 01:22:26 +00:00
Arvid Norberg d10205057e port mapping update 2008-04-06 23:18:35 +00:00
Arvid Norberg 2e6b9c2dce revamped part of the port mapping code (UPnP and NAT-PMP). Added documentation for start_{lsd,natpmp,upnp} and stop_{lsd,natpmp,upnp} 2008-04-06 19:17:58 +00:00
Arvid Norberg 57d75e120a initial support for GeoIP (only AS mappings for now) 2008-04-05 04:53:22 +00:00
Arvid Norberg 77f9278a36 leopart listen failure workaround 2008-04-03 04:35:56 +00:00
Arvid Norberg 1511f2f59b removed calls to self() from inside constructors in peer connections 2008-03-31 04:46:24 +00:00
Arvid Norberg 45a7329d5c added alert for when the client's external IP is received 2008-03-29 22:45:55 +00:00
Arvid Norberg ffecb32b81 made a bias to give connection attempts to downloading torrents with few peers. Should accelerate downloads on windows (where there's a half-open connection limit) 2008-03-29 19:39:24 +00:00
Arvid Norberg b6be33b5b6 storage fix 2008-03-25 04:38:59 +00:00
Arvid Norberg 32c2c38737 fixed incorrect error message in async_accept 2008-03-16 12:33:39 +00:00
Arvid Norberg 537f21d1b9 connection rate improvement when using a half-open connections limit 2008-03-16 10:49:47 +00:00
Arvid Norberg a97be6937a unchoker counts bytes instead of rates 2008-03-10 03:30:01 +00:00
Arvid Norberg f53cfa7eeb removed checker thread 2008-03-08 06:06:31 +00:00
Arvid Norberg 9d3b60edb7 added support to bind outgoing connections to specific ports (might be useful to do traffic shaping) 2008-02-28 07:34:07 +00:00
Arvid Norberg 83f405ac54 followups to windows fixes 2008-02-25 11:27:23 +00:00
Arvid Norberg a25c25b02a fixed windows build and removed msvc warnings 2008-02-25 10:28:53 +00:00
Arvid Norberg c1c2fb4409 resume data unit test and fix 2008-02-25 05:07:29 +00:00
Arvid Norberg df74cbb78a fixed logging=errors configuration 2008-02-17 22:51:03 +00:00
Arvid Norberg 7e83c3fc51 changed storage interface to not require exceptions 2008-02-14 03:48:20 +00:00
Arvid Norberg 948b2bafe6 made it work properly when building with stats logging 2008-02-12 08:34:57 +00:00
Arvid Norberg c5fd5ecfb4 removed 'adler32' key from fastresume, since it was implemented with blocking I/O 2008-02-11 07:18:28 +00:00
Arvid Norberg c9b53ddf8c allow negative and zero values for session_settings::connection_speed 2008-02-11 03:55:53 +00:00
Arvid Norberg 6c552db68e added disk cache expiration 2008-02-10 00:58:25 +00:00
Arvid Norberg a16d592ff4 handles lack of 'adler32' key in fast resume data 2008-02-09 19:51:23 +00:00
Arvid Norberg 8cf0510144 added disk cache for write operations 2008-02-08 10:22:05 +00:00
Arvid Norberg 1c82ef36d8 improved support for out-of-memory conditions 2008-02-05 05:51:05 +00:00
Arvid Norberg 61bbc6e58f initial https support for trackers and http_connection. Added support for proxies to http_connection 2008-01-27 22:39:50 +00:00
Arvid Norberg 8b455be1d9 better exception handling and more invariant checks 2008-01-19 19:00:54 +00:00
Arvid Norberg 5ff6708b3d made it build without dht support 2008-01-18 02:02:18 +00:00
Arvid Norberg afa6fd97a3 max connections limit fix 2008-01-18 01:29:28 +00:00
Arvid Norberg 4f99230c74 auto unchoke improvement 2008-01-17 21:34:00 +00:00
Arvid Norberg 127d3e6ad5 bandwidth limiter fixes. proper priority that cannot starve connections 2008-01-17 17:40:46 +00:00
Arvid Norberg 832c0c8b63 improved auto-unchoke mechanism 2008-01-15 08:37:48 +00:00
Arvid Norberg 5d196ed555 auto upload slots. opens up more slots if upload rate is not met. On by default 2008-01-13 11:18:18 +00:00
Arvid Norberg 7cea96ea88 added TORRENT_VERBOSE_BANDWIDTH_LIMIT build option to generate a bandwidth manager log 2008-01-12 18:47:26 +00:00
Arvid Norberg 72edfc2ee7 improved network interface enumeration and upnp device filtering 2008-01-11 06:49:37 +00:00
Arvid Norberg b5dedccb70 made trunk build on windows (mapped storage doesn't work right yet though) 2008-01-11 06:35:34 +00:00
Arvid Norberg 695cd6407b remove use of strand 2008-01-08 05:47:43 +00:00
Arvid Norberg e05f396a5d made UPnP ignore devices that don't respond from a router IP (optional but on by default) 2008-01-07 05:48:28 +00:00
Arvid Norberg cf4036310b changed the way connections are disconnected. improved logging. Does not depend on exceptions anymore 2008-01-07 01:10:46 +00:00
Arvid Norberg cfe5c8962e more asserts around send buffers and fixes potential race condition 2007-12-27 21:43:11 +00:00
Arvid Norberg d5748419c1 fixed upnp bug when connecting without network 2007-12-24 08:18:53 +00:00
Arvid Norberg e0d1951fac fixes #234. properly shuts down the disk io thread 2007-12-24 08:15:10 +00:00
Arvid Norberg d1311e2bb8 improved session logging 2007-12-19 21:36:54 +00:00
Arvid Norberg 8c3f9571de socks5 support for udp messages 2007-12-09 04:15:24 +00:00
Arvid Norberg cfc4638df5 fixed bug when trackers are removed from torrent 2007-12-07 21:53:33 +00:00
Arvid Norberg 77cea2eafc added more asserts in session_impl::check_invariant 2007-11-27 02:46:19 +00:00
Arvid Norberg c18ae83146 added wait_for_alert() to session. If there is at least one alert in the queue, it returns the front one in the queue, if the queue is empty, it waits until a new alert is posted and returns that one, or returns 0 if the time expires first. 2007-11-25 08:18:57 +00:00
Arvid Norberg c929f4fb69 fix for systems where IPv6 sockets bound to INADDR_ANY also listens on IPv4 connections 2007-11-23 22:14:33 +00:00
Arvid Norberg 88e69d0edc fix for when lsd, upnp or nat-pmp is started more than once 2007-11-23 21:11:31 +00:00
Arvid Norberg 55fac2518d local peers no longer counts as incoming_connections 2007-11-19 18:05:47 +00:00
Arvid Norberg 3489ccaebd explicit lsd close fix 2007-11-19 02:24:07 +00:00
Arvid Norberg 7be29d9b84 applied 'logpath' patch from #202 2007-11-16 21:21:28 +00:00
Arvid Norberg 41ef204f26 closes bandwidth rate limiters 2007-11-08 07:52:41 +00:00
Arvid Norberg 8868469f2f warning fix 2007-11-07 01:38:17 +00:00
Arvid Norberg fd51412b70 shutdown improvements. Fixes stall 2007-11-02 00:27:53 +00:00
Arvid Norberg 43d3fc9a28 fixed warning 2007-10-31 12:04:05 +00:00
Arvid Norberg 1a280e31fa cleanup. changed the connection map into a set of peer_connections. moved the policy object into the torrent (as opposed to being a pointer). Fixes issues with multiple peers on the same IP. Reduces some lookups. 2007-10-31 09:48:20 +00:00
Arvid Norberg 70810cb7e9 dht_state() no longer asserts on the dht being active. It just returns an empty state if it isn't 2007-10-29 16:18:37 +00:00
Arvid Norberg 79d4191ef5 attempt to fix stall on exit where some connections weren't closed 2007-10-29 00:29:43 +00:00
Arvid Norberg 3c05e0fa41 attempt to fix #190 2007-10-27 21:21:44 +00:00
Arvid Norberg 8f07edbed2 asio handlers are now properly cancelled when destructing the session object, race conditions are avoided by waiting for the io service to complete all tasks 2007-10-26 07:14:19 +00:00
Arvid Norberg 92d29334fa cleanup. doesn't allocate sockets on the heap for no reason anymore 2007-10-22 04:17:26 +00:00
Arvid Norberg d0ef85e802 fixed issue with failing async_accept on windows 2007-10-15 19:02:54 +00:00
Arvid Norberg 282edb5861 windows vista detection to set the default half-open connection limit even lower 2007-10-15 01:15:58 +00:00
Arvid Norberg 59c7f5bfbb added option to delete files from disk as a torrent is removed 2007-10-13 03:33:33 +00:00