Commit Graph

743 Commits

Author SHA1 Message Date
Arvid Norberg ce9cf5657d some cleanup and moved the upload_only = true to avoid failing an invariant check 2009-09-12 21:27:52 +00:00
Arvid Norberg f7ebefb285 fixed checking of fast and suggest messages when used with magnet links 2009-09-01 04:41:50 +00:00
Arvid Norberg b3372dced6 fixed rare request queuing issue for peers in parole mode 2009-08-28 07:48:31 +00:00
Arvid Norberg 45fd696bc6 added I2P support 2009-08-20 03:19:12 +00:00
Arvid Norberg 51c38c2e16 added performance warning when hitting the send buffer watermark limit 2009-08-17 20:29:09 +00:00
Arvid Norberg a6bcb8f8c9 fixed issue where web seed connections might have been disconnected in the constructor (which causes problems) 2009-08-08 15:27:07 +00:00
Arvid Norberg 5d76c19168 disconnect redundant fix 2009-08-02 00:05:41 +00:00
Arvid Norberg 78a6df0b2a connect candidate fix 2009-08-01 22:48:43 +00:00
Arvid Norberg ab26b1a5ff removed redundant code 2009-07-26 02:35:16 +00:00
Arvid Norberg 137d2d63f5 cleaned up policy. Moved logic from policy to torrent 2009-07-23 04:38:52 +00:00
Arvid Norberg 848a4b2cf2 fixed bug where downloading from peers could stall when downloading at very high rates 2009-07-21 04:29:29 +00:00
Arvid Norberg 7ad858ccd9 fixed rate limiter bug for local (unthrottled) connections 2009-07-19 09:17:40 +00:00
Arvid Norberg ae3be201c4 reduced the number of floating point operations to better support systems with no FPU 2009-07-19 04:59:27 +00:00
Arvid Norberg 3db42de4d9 fixed cancel_all_request() in peer_connection 2009-07-18 16:34:19 +00:00
Arvid Norberg 52f39a9af0 fixed inconsistency between peer's request list and piece picker in rare cases 2009-07-02 06:43:05 +00:00
Arvid Norberg 76db4627f6 another pending_bytes fix 2009-07-01 04:14:43 +00:00
Arvid Norberg 50fed84fe6 fixed typo 2009-06-28 22:58:21 +00:00
Arvid Norberg 315a4cdd1e some extra precaution for m_outstanding_bytes 2009-06-28 21:50:18 +00:00
Arvid Norberg ed0df519d7 fixed outstanding bytes counter assert 2009-06-28 21:09:07 +00:00
Arvid Norberg 6ddf63197f added more asserts around outstanding bytes counter 2009-06-28 07:39:06 +00:00
Arvid Norberg cbc740ee4f fixed bug where one allowed-fast message would be sent even when disabled 2009-06-28 00:47:49 +00:00
Arvid Norberg 2c5ef0debf fixed disk stats assert 2009-06-23 08:10:59 +00:00
Arvid Norberg c2e39ec907 adjust piece timeouts depending on download rate limit 2009-06-23 05:28:36 +00:00
Arvid Norberg c47f9cd64c fix channel_state assert 2009-06-19 18:19:24 +00:00
Arvid Norberg f09774607f added upload mode 2009-06-18 22:32:55 +00:00
Arvid Norberg 6b048dc85e fixed bug in connect candidate counter 2009-06-18 16:16:41 +00:00
Arvid Norberg 2da772210c fix to make torrent_status::list_peers more accurate 2009-06-13 04:14:41 +00:00
Arvid Norberg 07bcb3545a converted a whole lot of error strings into error_codes. Documented some previously undocumented alerts as well as all the error codes 2009-06-12 16:40:38 +00:00
Arvid Norberg af25f26538 correction of previous 'assert fix' 2009-06-12 16:12:19 +00:00
Arvid Norberg 5e87420b6f set all piece priorities to 0 when a write fails 2009-06-10 09:20:55 +00:00
Arvid Norberg f0134c1b11 improved disk error handling and expanded use of error_code in error reporting 2009-06-10 08:30:55 +00:00
Arvid Norberg bd33814376 improve disk error handling 2009-05-31 22:41:53 +00:00
Arvid Norberg 0283f07aed more buffer categories to help debugging 2009-05-31 22:38:49 +00:00
Arvid Norberg 524151c040 don't make more calls to the disk thread when aborting 2009-05-31 19:25:26 +00:00
Arvid Norberg 6b4fcfcd38 fixed assert 2009-05-31 10:43:29 +00:00
Arvid Norberg 177a7e881c fixed handling of dropped request 2009-05-31 05:50:07 +00:00
Arvid Norberg 31cae31ccc fix invariant check failure 2009-05-30 04:27:26 +00:00
Arvid Norberg d25d09cb70 fixed assert in peer_connection invariant check 2009-05-30 04:03:57 +00:00
Arvid Norberg 7b8ac7276c added some more asserts around m_outstanding_bytes 2009-05-26 16:12:09 +00:00
Arvid Norberg 30c704523c caches the time every 100 ms and use the cache where high resolution timer is not needed 2009-05-25 02:45:51 +00:00
Arvid Norberg e3c07c0934 converted some recursive mutexes to regular ones 2009-05-23 21:36:09 +00:00
Daniel Wallin 6014ac1e7a Allocate memory for read/write handlers inplace inside peer_connection instance. 2009-05-20 08:57:08 +00:00
Arvid Norberg 31c422df0a added feature to set a separate global rate limit for local peers 2009-05-14 17:21:19 +00:00
Arvid Norberg d5164b1b1e fixed typo. made it possible to set max_outstanding_disk_bytes_per_connection to 0 2009-05-12 17:57:52 +00:00
Arvid Norberg bc20af9375 ban self-connections, in order to not try them again 2009-05-07 05:10:19 +00:00
Arvid Norberg c8176cca55 optimized peer storage in resume data an in memory. Should use far less memory than previously for the peer list. Introduced peer source affinity, to avoid problem with a peer list that's diluted with stale peers 2009-05-06 22:36:24 +00:00
Arvid Norberg 89ac9916d7 replaced std::set with std::vector for accept fast piece list 2009-05-04 00:08:00 +00:00
Arvid Norberg 641abc6c4a slight memory optimization and some header cleanup 2009-05-03 20:21:24 +00:00
Arvid Norberg 06b609aa1f fixed unchoke bug. made the automatic unchoke strategy the default 2009-05-02 03:15:52 +00:00
Arvid Norberg 3cf34e3a91 greatly optimised memory usage for peer list 2009-04-30 05:49:46 +00:00
Arvid Norberg c7dd73dd08 add asserts to catch negative m_outstanding_bytes 2009-04-26 19:44:08 +00:00
Arvid Norberg 7109b86566 greatly simplified the rate limiter and generalized all rate limits (peer, torrent, global) to allow for arbitrary rate limit configurations 2009-04-26 00:21:59 +00:00
Arvid Norberg fba4ae541c fixed invalid iterator access in debug mode 2009-04-25 08:19:21 +00:00
Arvid Norberg 679a594f4e fixed typo in verbose bandwidth logging 2009-04-24 17:40:40 +00:00
Arvid Norberg 3c51ceb7c5 fixed bug when receiving keepalive message 2009-04-21 19:27:52 +00:00
Arvid Norberg 90ce06bb47 web seed fix 2009-04-11 20:45:14 +00:00
Arvid Norberg c6f2aa129c minor peer_connection fixes 2009-04-04 16:19:19 +00:00
Arvid Norberg e6f2073cd3 IPv6 fix 2009-04-04 10:08:07 +00:00
Arvid Norberg aba5b2e9d0 dropped some iostream dependencies 2009-04-04 09:52:25 +00:00
Arvid Norberg db8487be46 auto unchoke improvement 2009-04-04 07:55:34 +00:00
Arvid Norberg 33912a0fb7 invariant check fix 2009-03-31 18:01:12 +00:00
Arvid Norberg 0070232f7c attempt to fix #493 by keeping io_service running while there are still peer connections 2009-03-31 08:02:25 +00:00
Arvid Norberg 9c4c49c443 logging build fix and indentation fix 2009-03-27 17:14:15 +00:00
Arvid Norberg fb5ae3dc97 fixed dual IP stack issue 2009-03-22 20:34:57 +00:00
Arvid Norberg 31054ef069 first implementation of set_piece_deadline 2009-03-17 09:34:44 +00:00
Arvid Norberg 84a513bffb initial support for merkle hash tree torrents 2009-03-13 06:09:39 +00:00
Arvid Norberg f07ff08dd2 we can send requests when we're choked (for allowed fast pieces) 2009-03-12 17:27:59 +00:00
Arvid Norberg 0de21dc815 fixed bug related to ignoring upload slots and made the piece rejection code more robust to handle similar bugs better 2009-03-12 17:06:41 +00:00
Arvid Norberg 93eda7c7fa fix ignore unchoke slot invariant check 2009-03-01 07:20:08 +00:00
Arvid Norberg b25a8db2a6 added more error codes. consolidated exception classes into one. moved over more places to use error_code instead of strings. fixed proper error handling for torrent_info 2009-02-23 01:21:19 +00:00
Arvid Norberg 7fff6ace1b added download queue time estimate 2009-02-17 02:33:45 +00:00
Arvid Norberg 1ac8f806fa added seed mode support (lazy hash checking) 2009-02-03 07:46:24 +00:00
Arvid Norberg 2623037482 local peers are excempt from unchoke slots. #469 2009-01-28 06:14:21 +00:00
Arvid Norberg 8030454c96 fixes problem whith lexical_cast being locale dependent 2009-01-27 06:17:55 +00:00
Arvid Norberg c951ab3507 fixed potential problem if there are not enough references to a peer_connection when its disconnected 2009-01-25 02:45:31 +00:00
Arvid Norberg b3a17b1787 added disk buffer instrumentation and log parser 2009-01-23 09:13:31 +00:00
Arvid Norberg 3f94cc8857 made the sequential download mode slightly more sequential (by letting more categories of peers request early pieces). Disabled speed affinity and prefer_whole_pieces when in sequential download mode 2009-01-14 09:07:27 +00:00
Arvid Norberg 725fdef85e IP overhead calculation fix 2008-12-28 20:06:59 +00:00
Arvid Norberg 952ed687cd made session stats config build 2008-12-26 07:00:21 +00:00
Arvid Norberg 5bc4a2089d fixed seeding choking algorithm to be more fair (proper round robin) 2008-12-10 23:07:44 +00:00
Arvid Norberg 5fb854d724 improved super seeding with strict option 2008-12-09 07:56:37 +00:00
Arvid Norberg b41cdd6469 initial super seeding support 2008-12-08 06:36:22 +00:00
Arvid Norberg a00ddba109 fixed bug that would grossly underestimate the TCP/IP overhead 2008-12-01 07:23:58 +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 70119a6b53 consider 0-sized piece messages to be reject messages 2008-11-17 19:29:14 +00:00
Arvid Norberg 370ee02ef6 fixed incorrect assert when receiving a 0-size piece message 2008-11-17 19:12:34 +00:00
Arvid Norberg c3bbf138a4 estimate TCP/IP overhead more accurately 2008-11-14 20:51:49 +00:00
Arvid Norberg a5ba060240 when calculating desired queue size, block size should not depend on whether or not they are merged in the requests 2008-11-12 00:54:44 +00:00
Arvid Norberg a7af4d806b verbose logging improvement 2008-11-11 23:45:43 +00:00
Arvid Norberg 3412c0f709 added option to set peers in a state where it doesn't download 2008-11-06 08:34:56 +00:00
Arvid Norberg e0bea061b5 disabled an expensive assert when TORRENT_EXPENSIVE_INVARIANT_CHECKS is not defined 2008-11-01 19:44:39 +00:00
Arvid Norberg 44e9ff70de disconnect_if_redundant fix 2008-11-01 10:14:11 +00:00
Arvid Norberg 971f437b41 added num_pieces to peer_info. Fixes #385 2008-10-24 00:15:39 +00:00
Arvid Norberg 392dbb71da more fixes to avoid unwanted exceptions 2008-10-23 04:10:23 +00:00
Arvid Norberg a6ba48a60a removed exception usage in dht implementation and peer_connection 2008-10-21 17:10:11 +00:00
Arvid Norberg 8b835bf75f fix to faster unchoke a new peer if an unchoked peer becomes uninterested 2008-10-18 22:12:05 +00:00
Arvid Norberg f5f03ff681 improved seeding of files with small pieces to avoid swithing back and forth between unchoke sets 2008-10-17 04:33:22 +00:00
Arvid Norberg 2d1b72628e fix for unchoke_compare 2008-10-15 04:52:07 +00:00
Arvid Norberg 9152bc8712 fix to peer_connection::unchoke_compare 2008-10-15 02:18:59 +00:00
Arvid Norberg f0cd0c152c removed incorrect assert from recent check-in 2008-10-14 03:01:19 +00:00
Arvid Norberg fdadccf7a2 asserts for unchoke slot handling 2008-10-14 02:03:54 +00:00
Arvid Norberg c709cd28a8 fixes seeding behavior to avoid flipping unchoke slots back and forth too often 2008-10-14 00:57:58 +00:00
Arvid Norberg 62e365225b made some moer invariant checks count as expensive 2008-10-10 07:08:46 +00:00
Arvid Norberg b417a03877 removed unnecessary invariant check 2008-10-10 05:38:19 +00:00
Arvid Norberg 8499fd2fe2 moved some invariant checks into 'full-invariant-checks' builds 2008-10-10 05:25:55 +00:00
Arvid Norberg d06fea3d6c fix to handle 0-size piece response without asserting 2008-10-06 03:23:47 +00:00
Arvid Norberg ccd75006d4 fixed failing invariant check caused by a life-time issue in debug mode 2008-10-05 23:36:50 +00:00
Arvid Norberg 7733f74d7a fixed invariant check in peer_connection 2008-10-05 22:09:33 +00:00
Arvid Norberg 47c476dc0a include TCP handshake overhead 2008-09-26 06:10:21 +00:00
Andrew Resch 4189e0b697 add peer_info::progress 2008-09-25 20:39:06 +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 bb674134e3 fixed bind_port for outgoing peer connections 2008-09-25 07:40:55 +00:00
Arvid Norberg 13b343c1af added assertions that the stats is updated properly when receiving and sending bytes on peer_connections 2008-09-21 17:12:26 +00:00
Arvid Norberg f3d542fb2c fixed inconsistent upload_only and seed in some cases when running a metadata-less torrent 2008-09-19 23:02:45 +00:00
Arvid Norberg eb89269b6a update_interest fix for torrents without metadata 2008-09-19 07:14:24 +00:00
Arvid Norberg e85cb90652 fixed assert in peer_connection 2008-09-19 02:37:05 +00:00
Arvid Norberg e7df553fdd fixed race condition when calling a function that re-evaluates the interested flags on peers (such as prioritize files) right after the metadata is received, but before the connections are initialized 2008-09-18 20:17:49 +00:00
Arvid Norberg a61c1ee01d more disconnect handling for upload-only 2008-09-07 10:00:58 +00:00
Arvid Norberg 41808f8742 big change to improve piece picker. Better end-game mode. More options on which pieces to pick. 2008-09-06 21:04:57 +00:00
Arvid Norberg c7c0974d3f fixed bugs in verbose logging 2008-09-04 14:39:02 +00:00
Arvid Norberg d179280da2 fixed off-by-one error when receiving a piece which skipped a bunch of requests 2008-09-01 17:41:13 +00:00
Arvid Norberg 92ed7fb364 fixed metadata extension issues 2008-08-29 17:21:56 +00:00
Arvid Norberg 238dcea91d fixed missing 'set_error' when write failed 2008-08-26 23:10:42 +00:00
Arvid Norberg 7cdc7b2912 fixed typo 2008-08-25 21:10:13 +00:00
Arvid Norberg f407c6d24e fixed bug in piece time-out code. Fixes #388 2008-08-25 15:25:46 +00:00
Arvid Norberg 71db0f32db removed incorrect assert. Fixes #309 2008-08-21 11:54:38 +00:00
Arvid Norberg 37389e4fe4 added test to measure peak download rate and introduced performance warning alert when disk buffer limit and request limit are reached 2008-08-19 15:04:14 +00:00
Arvid Norberg 89907cdae8 fix no-metadata case to not send any other messages before the bitfield (which is sent once we have the metadata) 2008-08-16 22:07:15 +00:00
Arvid Norberg 68b61e4df6 removed redundant condition 2008-08-12 09:27:42 +00:00
Arvid Norberg c725d44ced fixed serious issue with 'disconnect redundant peers' where seeds would be disconnected while downloading 2008-08-12 08:18:05 +00:00
Arvid Norberg a8562a9f19 small optimization of expensive invariant check 2008-07-30 06:42:08 +00:00
Arvid Norberg 7607034ab6 exposed upload_only in peer_info 2008-07-19 07:57:43 +00:00
Arvid Norberg 4597de74df removed incorrect assert 2008-07-19 07:35:24 +00:00
Arvid Norberg 429a118dd2 keep track of interest more tightly. better support for upload_only 2008-07-18 10:03:42 +00:00
Arvid Norberg 5bf38323c1 removed invariant check that can get triggered in peer_connection::snub_peer 2008-07-13 08:06:24 +00:00
Arvid Norberg 1ed583011c made the invariant checks cheaper and more useful. The full invariant checks are still available as an option 2008-07-12 17:51:59 +00:00
Arvid Norberg 535aaf8182 fix to previous parole fix 2008-07-11 09:25:03 +00:00
Arvid Norberg 589e098002 fixed parole mode with timeouts and made it optional 2008-07-11 09:23:22 +00:00
Arvid Norberg 96ca475652 added redundant and failed byte counters to session 2008-07-11 07:30:04 +00:00
Arvid Norberg 680dab5a67 make 'snubbed' more sticky by only giving one request_timeout back when a new block is being received 2008-07-10 19:31:22 +00:00
Arvid Norberg 1bdb6afebd fixes to previous connection timeout check-in 2008-07-10 10:58:30 +00:00
Arvid Norberg d51bdc0ec0 rare request optimization 2008-07-09 18:01:00 +00:00
Arvid Norberg 22da6b5901 fixed bug where FAST pieces were cancelled when choking 2008-07-09 17:45:37 +00:00
Arvid Norberg 74fd7eea71 fixed alert posting typo 2008-07-09 17:40:03 +00:00
Arvid Norberg fc3bb01587 ignore zero size piece messages 2008-07-09 17:37:38 +00:00
Arvid Norberg 2d099b090f peer snubbing fix 2008-07-09 11:11:06 +00:00
Arvid Norberg 63d4e0d4a3 invariant check fix 2008-07-08 21:33:36 +00:00
Arvid Norberg 55a944c014 added a unwanted_block_alert 2008-07-08 18:41:04 +00:00
Arvid Norberg 5c749bcb3c added base class for peer_alerts and turned more alerts into peer_alerts with more information about the peer that generated it 2008-07-08 09:30:10 +00:00
Arvid Norberg 8d4bea9f95 fixed invariant check that could be triggered since peer snubbing was introduced 2008-07-08 08:13:45 +00:00
Arvid Norberg a20f1a8fa0 keeps track of the number of requests waiting in the send buffer and adjusts bandwidht priority accordingly in the bandwidth limiter 2008-07-08 00:03:08 +00:00
Arvid Norberg f7042ca84a improved piece timeout and peer snubbing logic 2008-07-07 12:04:06 +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
Arvid Norberg 66a7f98d84 fixed missing torrent error state 2008-07-02 21:27:16 +00:00
Arvid Norberg 0e1d2ede70 fix invariant-check bug in peer_connection 2008-06-30 07:58:50 +00:00
Arvid Norberg 8f1abd9dbe fix bug in previous check-in 2008-06-29 18:03:38 +00:00
Arvid Norberg 2ac5c13e6f introduced a stricter timeout on piece requests and snubbing. exposed some more data about this through the peer_info. Fixes #40 2008-06-29 09:50:42 +00:00
Arvid Norberg ae9f1e0465 fixed typo 2008-06-29 06:01:20 +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 964e8b93d0 added option to deliberately corrupt data from certain peers, to test the case when hash fails occurs 2008-06-23 15:37:24 +00:00
Arvid Norberg 6db1b54304 simplified policy and optimized case when a piece fails hash check 2008-06-22 20:28:03 +00:00
Arvid Norberg 9a8fc4f713 self connection fixes 2008-06-16 13:54:14 +00:00
Arvid Norberg 9d1e77dc88 optimized away torrent::m_have_pieces (#62) and added some documentation on bitfield. The piece picker is now constructed with the torrent, but still freed when turned into a seed 2008-06-07 02:58:28 +00:00
Arvid Norberg c883f4475c saves statistics from the last second from peer connections that are disconnected. Partly fixes #339 2008-06-03 05:21:00 +00:00
Arvid Norberg 68c31e48dc replaced vector<bool> with a custom bitfield type 2008-05-28 02:35:02 +00:00
Arvid Norberg c460704a5f streamlined class footprint by reducing padding 2008-05-19 02:52:32 +00:00
Arvid Norberg 111f5faecb upload only extension 2008-05-18 05:59:47 +00:00
Arvid Norberg 91d6099a55 fixed issue with torrents with 0 pieces. Fixes #306 2008-05-15 02:29:26 +00:00
Arvid Norberg f259e34f86 peer_connection fix for incoming connections 2008-05-12 10:10:39 +00:00
Arvid Norberg 2fbe53f880 assert fix 2008-05-12 06:31:54 +00:00
Arvid Norberg 971ead4a44 made redundant connction closing optional (defaults to on) 2008-05-12 06:25:53 +00:00
Arvid Norberg 068adcd9a9 indentation fix 2008-05-12 06:03:31 +00:00
Arvid Norberg eabe9cad2d improved plugin support 2008-05-12 03:05:27 +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 d15573ecc2 disk receive buffer cleanup 2008-05-05 06:25:22 +00:00
Arvid Norberg c7e6c04705 switched over to asio from boost-1.35 2008-05-03 16:05:42 +00:00
Arvid Norberg 441aacae32 fixed download bug affecting web seeds 2008-04-29 03:12:14 +00:00
Arvid Norberg a4b69e5b2d logging improvements 2008-04-20 17:17:58 +00:00
Arvid Norberg d4cfa126aa storage fixes 2008-04-12 22:08:07 +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 2c77ae8307 fixed typo 2008-04-10 05:40:54 +00:00
Arvid Norberg 62daedeae0 fixed race condition when a torrent is removed while one of the connections is still in the connection queue 2008-04-09 20:12:52 +00:00
Arvid Norberg 5a6e21f484 peer_connection disconnect cleanup 2008-04-09 04:09:40 +00:00
Arvid Norberg e329403619 removed exceptions from peer_connection 2008-04-07 08:39:01 +00:00
Arvid Norberg 04a9dd77b5 assert fix 2008-04-07 08:15:31 +00:00
Arvid Norberg 35fd9aec61 msvc build fixes and warning fixes 2008-04-05 21:18:27 +00:00
Arvid Norberg 57d75e120a initial support for GeoIP (only AS mappings for now) 2008-04-05 04:53:22 +00:00
Arvid Norberg 0fcb204128 added peak rates to peer_info 2008-04-03 06:11:21 +00:00
Arvid Norberg 4161be867e removed dht ping from peer_from_tracker. in trunk: implemented a rate limited DHT ping (once a second per torrent) and space optimized the peer structure 2008-04-01 17:38:19 +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 e1eadab1b4 fixed memory leak on disk io failures 2008-03-24 02:33:42 +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 ab2354c9b4 small optimization to previous fix 2008-03-14 17:43:38 +00:00
Arvid Norberg 2cfbfd203f made tests build and pass in trunk. fixed issues in trunk revealed by the tests. fixed failing torrent invariant check in trunk and rc0.13 2008-03-14 10:17:27 +00:00
Arvid Norberg 8132c6aad6 added option to control TOS byte in peer traffic 2008-03-12 16:58:23 +00:00
Arvid Norberg 5173c7fe31 more invariant check in peer connection 2008-03-12 08:36:22 +00:00
Arvid Norberg a97be6937a unchoker counts bytes instead of rates 2008-03-10 03:30:01 +00:00
Arvid Norberg 35c113c0cb piece request fix + better logging of throttling 2008-02-27 20:37:41 +00:00
Arvid Norberg 333839c9b4 piece picker update 2008-02-18 03:07:14 +00:00
Arvid Norberg f1ceb44dc4 fixed assert. #271 2008-02-17 20:40:21 +00:00
Arvid Norberg cecd0dfcd2 added rtt estimation for outgoing connections 2008-02-09 22:42:56 +00:00
Arvid Norberg 8cf0510144 added disk cache for write operations 2008-02-08 10:22:05 +00:00
Arvid Norberg a53473a65d added new logging mode to log peer errors 2008-02-07 07:09:52 +00:00
Arvid Norberg 5d4d08b7ce fix problem introduced with new piece picker 2008-02-05 05:57:32 +00:00
Arvid Norberg 1c82ef36d8 improved support for out-of-memory conditions 2008-02-05 05:51:05 +00:00
Arvid Norberg c798ab30e1 rewrote the piece picker to be more cpu and memory efficient. replaces the concept of sequential-download-threshold with just a sequential download settings 2008-01-31 17:52:29 +00:00
Arvid Norberg 8b455be1d9 better exception handling and more invariant checks 2008-01-19 19:00:54 +00:00
Arvid Norberg 127d3e6ad5 bandwidth limiter fixes. proper priority that cannot starve connections 2008-01-17 17:40:46 +00:00
Arvid Norberg c69fa07e2d error handling fixes 2008-01-16 21:07:04 +00:00
Arvid Norberg b19bf337bf generalized peer read/write state 2008-01-13 23:46:43 +00:00
Arvid Norberg f48ded8a54 fast extension fix 2008-01-13 09:33:00 +00:00
Arvid Norberg 616a48b591 fix to count loopback connections as local peers 2008-01-11 05:40:19 +00:00
Arvid Norberg 471d81394d added invariant check 2008-01-10 22:44:32 +00:00
Arvid Norberg 3a727e99ff expose more info through peer_info 2008-01-10 22:13:23 +00:00
Arvid Norberg 4420473b88 made send buffer watermark configurable 2008-01-08 01:16:30 +00:00
Arvid Norberg 1d6e0f5bf6 bandwidth request block size optimization 2008-01-07 04:47:20 +00:00
Arvid Norberg 0dfb129b57 another failcount update fix 2008-01-07 04:07:31 +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 4271eda751 correctly increase the failcounter when appropriate 2008-01-07 00:33:20 +00:00
Arvid Norberg fcd2408f11 fast extension fix, added some logging for fast extension messages, improved test to catch the problem 2008-01-02 03:18:29 +00:00
Arvid Norberg 9d2c0e370e fixed broken assert 2007-12-31 10:11:10 +00:00
Arvid Norberg ddf16fb3bb separated bandwidth_manager into bandwidht_limit and bandwidth_queue_entry and fixed problems related to #225 2007-12-31 09:41:50 +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 ba172954e6 accept have messages without having metadata and without having received a bitfield 2007-12-20 23:58:58 +00:00
Arvid Norberg 3b4cccf1dd fixed broken assert 2007-12-20 23:53:03 +00:00
Arvid Norberg d1311e2bb8 improved session logging 2007-12-19 21:36:54 +00:00
Arvid Norberg 9aa2ddec80 added a plugin 'smart_ban' that can ban peers sending bad data with higher accuracy 2007-12-18 06:04:54 +00:00
Arvid Norberg 456f8f8677 fix to bound check piece index before use in incoming_allowed_fast 2007-12-18 04:40:19 +00:00
Arvid Norberg ac28fa7b62 some more asserts related to bandwidth manager 2007-12-14 18:02:06 +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 f054ae7c2d made the handshake timeout configurable and defaults to 10 seconds 2007-10-23 00:19:28 +00:00
Arvid Norberg fcc238e801 lowered piece timeout and sends cancels for pieces when a time out occurs 2007-10-22 20:58:42 +00:00
Arvid Norberg d3bce762c5 added timeout logging in verbose logging mode 2007-10-22 04:56:09 +00:00
Arvid Norberg a00f27b7ec some extra peer logging + fix for previous invariant check 2007-10-18 04:18:09 +00:00
Arvid Norberg b032c26bf0 adds invariant check to make sure pieces that are complete are also checked. adds a debug function in the disk_io_thread. Fixes a problem with a failing disk write that would not clear the block for re-download. Adds some extra session logging 2007-10-18 00:32:16 +00:00
Arvid Norberg 1699fa4652 fast reconnect fixes 2007-10-15 05:03:29 +00:00
Arvid Norberg 28113c9c42 parole mode improvement. Doesn't clear out the request queue when choked by a peer on parole anymore 2007-10-10 02:27:55 +00:00
Arvid Norberg f5f658f8fd fast extension fixes 2007-10-05 22:45:24 +00:00
Arvid Norberg 966800cd5b replaced the assert macro to TORRENT_ASSERT instead of hi-jacking assert. 2007-10-05 00:30:00 +00:00
Arvid Norberg 2940d253c3 completed fast reconnect fix 2007-10-04 21:26:50 +00:00
Arvid Norberg d29fbdc453 added tests for fast extension features + fixes 2007-10-04 09:32:09 +00:00
Arvid Norberg 51f12e774e moved block_downloading_alert and block_finished_alert to debug level 2007-10-03 22:53:52 +00:00
Arvid Norberg c9d245e9f1 handles case where a request in the allow fast set is rejected 2007-10-03 16:57:20 +00:00
Arvid Norberg 1cbe23667b added check for valid allowed-fast messages 2007-10-01 01:12:00 +00:00
Arvid Norberg b48948e231 changed the double send buffers to a chained buffer using iovec send operations. buffers are recycled (saves memory and cpu) and memory copies are avoided (saves cpu). More statistics is added to track buffer usage 2007-09-29 16:14:03 +00:00
Arvid Norberg 3b6aee6d86 switched out std::vector to use libtorrent::buffer as an optimization 2007-09-23 00:51:45 +00:00
Arvid Norberg abbe3c774f fixed problem with clashing connections when allowing multiple peers from the same IP 2007-09-19 06:05:14 +00:00
Arvid Norberg 33add5bb91 added a shorter timeout while waiting for a hanshake response from peers 2007-09-17 02:29:33 +00:00