Commit Graph

450 Commits

Author SHA1 Message Date
Matt Joiner e0d936e920 dht: Various improvements and removal of cruft 2014-12-26 17:21:48 +11:00
Matt Joiner 8b7548e7a0 Fix sending to localhost on OSX 2014-12-26 17:19:01 +11:00
Matt Joiner 7e6b3b24e3 Catch a few possible connection leaks 2014-12-26 17:18:36 +11:00
Matt Joiner cc5dea6a39 Reenable UTP despite it being broken, some binaries now have flags to disable it 2014-12-26 17:18:15 +11:00
Matt Joiner 9b0e387ac9 Quieten tracker announce logging 2014-12-26 17:17:49 +11:00
Matt Joiner e4209a2d00 Reorder some imports 2014-12-26 17:17:00 +11:00
Matt Joiner caa389784a util.Addr* funcs: Add optimizations for *net.UDPAddr 2014-12-26 17:16:20 +11:00
Matt Joiner 3a221dc57d Rip out the pieces by bytes left and responsive download strategy stuff 2014-12-26 17:15:17 +11:00
Matt Joiner c817776fda Don't include active handshakes in the half open limit
Large numbers of incoming connections choke initiation of outbound conns.
2014-12-23 15:20:28 +11:00
Matt Joiner 59d6b67c69 dht: Fix partial deadlock closing peer discovery 2014-12-20 13:02:12 +11:00
Matt Joiner e406d74ff0 Don't guess cap for some torrent fields, need to minimize memory use 2014-12-20 13:00:21 +11:00
Matt Joiner db749b89db dht-get-peers: Don't bother to close the server before quitting
The closing code isn't very clean yet, and it's unnecessary.
2014-12-20 10:11:34 +11:00
Matt Joiner dbf72c1033 dht: Some peer sent me a bad info_hash 2014-12-20 10:10:53 +11:00
Matt Joiner ec47c4f4dc dht: Use a bloom filter to track contacted nodes during peer discovery 2014-12-20 10:10:22 +11:00
Matt Joiner 20d4549430 dht: Use both bootstrap addrs, as they seem to take turns going down 2014-12-20 10:09:11 +11:00
Matt Joiner e6c93455b5 Add some tools for analysing bloom filter use 2014-12-20 10:07:41 +11:00
Matt Joiner 8d87bb83a6 Refine connection status flags 2014-12-09 00:26:06 -06:00
Matt Joiner b52f866e90 dht: We can now message nodes with no ID if there's nothing better 2014-12-09 00:25:49 -06:00
Matt Joiner b2dd026793 Update TODO 2014-12-09 00:24:57 -06:00
Matt Joiner f513772f1f dht: Slow down the start a little, as lots of torrents will hammer out UDP packets 2014-12-09 00:24:05 -06:00
Matt Joiner 262f045fd1 Fixes due to not pending chunk specs prematurely 2014-12-09 00:22:05 -06:00
Matt Joiner 998d85ba50 :) 2014-12-08 21:59:01 -06:00
Matt Joiner 48582796ed Add pending peers high water mark to stop excessively long running DHT queries 2014-12-08 21:58:49 -06:00
Matt Joiner fa501ed06a dht: Limit the size of peer discovery backlog 2014-12-08 21:57:53 -06:00
Matt Joiner a081ad63d9 Save memory by not pending chunks prematurely 2014-12-08 21:57:13 -06:00
Matt Joiner e926a8d65c dht: During get_peers, put discovered nodes in a backlog for later querying 2014-12-08 20:00:42 -06:00
Matt Joiner d1bcb272bc dht: A few minor improvements 2014-12-08 19:14:10 -06:00
Matt Joiner 78eb25535d dht: Cap nodes to 10k, drop nodes that timeout if we're out of space 2014-12-08 19:09:11 -06:00
Matt Joiner 4be7b11a3b Use bitbucket.org/anacrolix/sync 2014-12-08 17:00:38 -06:00
Matt Joiner ac57158982 dht: Store transactions by key, and fix partial deadlock 2014-12-08 16:59:25 -06:00
Matt Joiner d9793a78ba Improve announce logging 2014-12-08 16:57:42 -06:00
Matt Joiner c6d41cf027 dht: Tidy up GetPeers() 2014-12-06 21:22:12 -06:00
Matt Joiner 35ba3c44e1 dht: Retry queries twice before timing out 2014-12-06 21:21:20 -06:00
Matt Joiner 1e3a00979d Fix UTP still listening despite attempting to temporarily disable it 2014-12-06 21:19:56 -06:00
Matt Joiner 51306ccbb2 Expose various DHT state 2014-12-06 21:19:02 -06:00
Matt Joiner a4dc96bb12 Make some overlap of piece priorities
The goal is to reduce duplicating requests on higher priority pieces.
2014-12-06 21:18:17 -06:00
Matt Joiner bacb1af357 Write piece status as counts of contiguous identical states 2014-12-06 21:16:02 -06:00
Matt Joiner 9be0f6463f internal/pieceordering: Switch to a different skiplist implementation 2014-12-06 21:15:03 -06:00
Matt Joiner 3c41002317 Set a low water mark for replenishing requests 2014-12-05 00:58:43 -06:00
Matt Joiner d58ca65a9c pieceordering: Rename RemovePiece->DeletePiece and complete tests
Note that tests currently fail due to bug in skiplist?
2014-12-05 00:58:04 -06:00
Matt Joiner 65ccc9c75e Forgot to commit this part of fixing disable TCP dialing out 2014-12-05 00:56:51 -06:00
Matt Joiner b6ae4caa6a Set priorities ahead of the current read position 2014-12-05 00:56:28 -06:00
Matt Joiner ac1afa19b8 mmap_span: Avoid allocating the span slice on every use 2014-12-05 00:54:55 -06:00
Matt Joiner f050bc02f7 Disabling TCP didn't include dialing out, also always disable UTP until the package is fixed 2014-12-05 00:53:26 -06:00
Matt Joiner 7b46b41011 Switch back to using the UTP redesign 2014-12-03 19:58:02 -06:00
Matt Joiner 7ba25ce936 A probably unhelpful test that ensures UTP performs 2014-12-03 19:57:43 -06:00
Matt Joiner 7b80153387 fs: Improve tests 2014-12-03 12:53:10 -06:00
Matt Joiner 3f44ed8c43 Improve fs/unwedge tests 2014-12-03 12:52:08 -06:00
Matt Joiner ba1367536c tracker/udp: Tidy up tests 2014-12-03 12:51:49 -06:00
Matt Joiner 51f5273ba9 util/dirwatch: Some tidying 2014-12-03 12:10:29 -06:00