Commit Graph

31 Commits

Author SHA1 Message Date
Matt Joiner e0c2265cb0 Support sending HaveAll 2018-02-04 19:10:25 +11:00
Matt Joiner efecf88d3c Use flip buffering for connection writing 2018-02-03 15:09:38 +11:00
Matt Joiner 7a95714df2 Factor out connection.onReadRequest 2018-02-02 19:19:14 +11:00
Matt Joiner b0c1f99509 Merge a bunch of stuff into ConnStats and refactor connection.upload 2018-02-02 19:04:56 +11:00
Matt Joiner e3c098441a Add Torrent.setInfo 2018-01-25 17:10:37 +11:00
Matt Joiner ed7e3f6ec0 Make Torrent.pendingPieces a priority bitmap in preparation for #220 2018-01-12 12:24:37 +11:00
Matt Joiner dd083a4e11 Track completion known to implementation state
Addresses #193
2017-10-12 16:09:32 +11:00
Matt Joiner b3137b1ede Make type piece public 2017-09-15 19:35:16 +10:00
Matt Joiner 13e79039f2 Generate requests, cancels and interest state in the connection writer 2017-08-31 23:48:52 +10:00
Matt Joiner 986b9093a0 Make connection.writer pull from a buffer 2017-08-31 16:26:45 +10:00
Matt Joiner e34681d5d5 Accept racy result in keep alive test 2017-08-16 17:05:34 +10:00
Matt Joiner 90ca45dd2d Don't accept pieces with bad indexes
Fixes #132
2016-11-22 14:20:48 +11:00
Matt Joiner c34234bf34 Split connection.rw into separate Reader and Writer
This will make it easier to write hooks for Read and Write separately.
2016-10-10 16:30:51 +11:00
Matt Joiner de761fb506 Do chunk pooling at Torrent instead of connection level 2016-10-05 15:57:00 +11:00
Matt Joiner 39f5d76de4 Add a benchmark for readMainLoop piece decoding 2016-09-11 15:43:57 +10:00
Matt Joiner dcfee93f96 Fix race marshalling a bitfield after a Have has also been posted 2016-05-11 23:50:21 +10:00
Matt Joiner 0fd73396fd missinggo.Event changed, connection.writeOptimizer changes 2016-05-07 18:56:44 +10:00
Matt Joiner bfd0b86441 Tidy up the peer have{,all,none},bitfield handling 2016-03-22 12:07:03 +11:00
Matt Joiner 08c0c49c4a Remove internal/pieceordering 2016-01-18 20:11:53 +11:00
Matt Joiner 06445f2a1e It's working and the tests are usually passing
I still need to handle "prefetch"-style downloading, and some functions haven't been committed to force this issue.
2016-01-18 18:35:14 +11:00
Matt Joiner 53259397fc Initialize connection piece priorities lazily, and using a pool 2015-09-26 17:27:35 +10:00
Matt Joiner 64848a206a Replace go-check with testify
It's muuuuch better.
2015-08-03 16:23:05 +10:00
Matt Joiner 21fb4933fc Change the way piece state is exposed to give more detail 2015-06-01 18:22:12 +10:00
Matt Joiner 3aa78763aa Use rogpeppe's sortimports to fix this goimports ordering madness 2015-03-26 17:18:08 +11:00
Matt Joiner 842a32ae0c Rewrite import paths for migration from Bitbucket 2015-03-20 16:37:44 +11:00
Matt Joiner 30c67caced Allow some overlap between piece prioritization classes
This probabilistically improves download speeds when doing readaheads
2015-03-20 10:52:55 +11:00
Matt Joiner 4d510ddca1 Piece priority tests 2015-03-18 18:37:52 +11:00
Matt Joiner e4209a2d00 Reorder some imports 2014-12-26 17:17:00 +11:00
Matt Joiner 7f6987b2a4 Error in connection.writer goroutine wasn't killing the connection 2014-07-18 02:37:33 +10:00
Matt Joiner b53e019a6f Fix broken connection write optimizer test 2014-06-26 17:30:54 +10:00
Matt Joiner cfc282ff51 Remove requests from the outbound message queue if cancelled before they're written
Only post peer protocol messages to the channel, bytes must be done directly.
This fixes a possible issue where slow responses during handshake could cause
keep alive messages to be sent prematurely.
2014-05-29 01:27:48 +10:00