Commit Graph

80 Commits

Author SHA1 Message Date
Matt Joiner 89b17c4372 Try to print something useful for MessageType panics 2018-02-02 21:52:57 +11:00
Matt Joiner b610107d8d Break up peer_protocol into several files 2018-02-02 21:29:57 +11:00
Matt Joiner c9507786f2 Count requested chunk lengths
Have seen some very ridiculous lengths causing data read errors
2018-02-02 16:06:24 +11:00
Matt Joiner 092b139dcf Fix peer_protocol benchmark 2018-01-25 17:43:45 +11:00
Matt Joiner 0b553b296f Add File priorities
Fixes #220.
2018-01-21 22:49:12 +11:00
Matt Joiner 9757f04cf8 Apply megacheck to torrent package 2017-11-07 16:11:59 +11:00
Matt Joiner 3ed8274384 Abstract out making a cancel message 2017-09-18 13:42:42 +10:00
Matt Joiner 260806a6f2 peer_protocol: Improve piece decoding benchmark 2017-09-12 21:32:01 +10:00
Matt Joiner 01fee38709 peer_protocol: Add a benchmark for decoding pieces 2017-09-12 21:12:56 +10:00
Matt Joiner 3eb422afd0 Add peer_protocol.Message.MustMarshalBinary 2017-08-31 14:30:53 +10:00
Matt Joiner 47ef753795 peer_protocol.Decoder.Decode: Avoid allocating another intermediate reader
On my system, BenchmarkConnectionMainReadLoop goes from 596 to 1311 MB/s.
2016-09-25 10:31:43 +10:00
Ye Yin d3963eedfd Use sync.pool for decode buffer 2016-09-12 17:32:04 +10:00
Matt Joiner 380dc7a2b4 Add peer_protocol.Integer.Int() 2016-02-21 17:25:26 +11:00
Matt Joiner e85b7e228b Add support for Fast Extension 2015-03-12 20:06:23 +11:00
Matt Joiner c9bc892789 Implement the DHT Port message 2014-08-25 22:12:16 +10:00
Matt Joiner a2fabedfa2 Clarify EOF in message decoding 2014-08-22 17:39:18 +10:00
Matt Joiner 6da2b7ee00 Fix peer_protocol test 2014-07-18 02:38:32 +10:00
Matt Joiner a258b9ab21 Squash some more debug messages, fix some other error handling 2014-07-17 16:01:48 +10:00
Matt Joiner c96293a111 Can now download from magnet links 2014-06-28 19:38:31 +10:00
Matt Joiner 49e71f9654 Begin adding magnet and ut_metadata support 2014-06-27 00:57:07 +10:00
Matt Joiner ef69e82765 Keepalives weren't marshalled correctly 2014-05-29 01:22:51 +10:00
Matt Joiner dd30d144ae Avoid rebuffering in peer_protocol.Decode 2014-05-23 00:36:47 +10:00
Matt Joiner 8cb39521f2 Fix short read and report unexpected EOFs decoding peer protocol 2014-03-21 00:42:40 +11:00
Matt Joiner 2e81f914e7 Add a end-to-end test for torrentfs
Basic unchoking and uploading.
Accept incoming connections.
Break out torrentfs lib.
Fix and implement some protocol stuff.
2014-03-18 01:44:22 +11:00
Matt Joiner 5dbd675be6 Fix TestHaveEncode now that message length prefixes are actually included in Marshal output 2013-10-06 16:05:03 +11:00
Matt Joiner beb599698f Decoding of Piece messages, and checking entire message is consumed 2013-10-02 17:57:19 +10:00
Matt Joiner 28531a4fcc Fix request/chunk confusion, missing outgoing message prefix, protocol tests; improve request triggering 2013-10-01 18:43:18 +10:00
Matt Joiner 081a6805c5 Implementing bitfields and connection message handling 2013-09-30 21:51:08 +10:00
Matt Joiner abf5c92488 Implement peer connection writer, optimizer and handshake 2013-09-29 16:45:17 +10:00
Matt Joiner 7870d20573 Begin implementing the adding of peers, and initiating of connections 2013-09-29 08:11:24 +10:00