Matt Joiner
f8fb480817
Avoid copying mutex in piece
2015-10-30 01:16:52 +11:00
Matt Joiner
5372375bd5
Fix #35
2015-10-29 23:47:13 +11:00
Matt Joiner
e912ac5293
Add test for issue 35
2015-10-29 23:46:47 +11:00
Matt Joiner
db3ec698e9
Some missing io.EOFs
2015-10-23 12:45:51 +11:00
Matt Joiner
4c4eae20a2
data/pieceStore: Expose flags in Open method
2015-10-23 12:45:11 +11:00
Matt Joiner
ea0ccf6a23
Tidy
2015-10-23 12:42:57 +11:00
Matt Joiner
b8da06a885
cmd/torrent: Expose --mmap
2015-10-23 12:42:19 +11:00
Matt Joiner
99a0813d88
dht: Make Msg a struct with bencode tags
2015-10-23 12:41:45 +11:00
Matt Joiner
de69976bbf
Merge branch 'master' of github.com:anacrolix/torrent
2015-10-23 12:38:00 +11:00
Matt Joiner
47a2453098
bencode: Can't get zero type of a nil interface
2015-10-23 12:37:30 +11:00
Matt Joiner
837bdd2ccf
bencode: Rethrow non-errors during encoding
2015-10-23 12:36:47 +11:00
Matt Joiner
1fb64de07c
bencode: Encoding nil interfaces are an error except at data root
2015-10-23 12:35:38 +11:00
Matt Joiner
c7cb1009a5
Fix #33 .
2015-10-20 17:53:12 +11:00
Matt Joiner
1a4fbed1ac
Make Piece a concrete type
...
There was a lot of allocations occuring because it was an interface.
2015-10-19 01:31:34 +11:00
Matt Joiner
4b539b1f11
bencode: Don't skip encoding nil pointers and interfaces
...
This caused an annoying bug for complex types where dictionary values went missing.
2015-10-19 01:28:36 +11:00
Matt Joiner
ddf7cbbdac
bencode: Use default field name if it isn't given (but options are)
2015-10-19 01:27:15 +11:00
Matt Joiner
644ee0a244
bencode: Tidy up
2015-10-19 01:25:56 +11:00
Matt Joiner
9c200c0037
Missed in last commit
2015-10-19 00:02:42 +11:00
Matt Joiner
a4049e179c
Avoid allocation in iplist.Ranger.Lookup
...
It was very expensive for DHT packets.
2015-10-19 00:00:26 +11:00
Matt Joiner
14a7e8121f
Update TODO
2015-10-18 02:32:24 +11:00
Matt Joiner
b3a8020401
Store pieces inplace in torrent.Pieces
...
This should save some allocation overhead, especially for torrents that have 20k+ pieces.
2015-10-16 22:10:03 +11:00
Matt Joiner
db2dcfee3e
Update README
2015-10-16 22:07:13 +11:00
Matt Joiner
7979551525
Merge pull request #31 from kupsef/master
...
fix: added announce to torrent spec
2015-10-11 09:46:47 +11:00
Kupai József
70a307a5ea
fix: added announce to torrent spec
2015-10-10 14:31:02 +02:00
Matt Joiner
12722754e6
Some slow tracker tests can be Parallel
2015-10-04 19:58:23 +11:00
Matt Joiner
b0b5794890
Create a pieceStore interface, and merge in my httpfile backend, and replace data/blob
...
data/blob was aging, and had severe performance problems. It's now possible to use missinggo/filecache as a data backend to pieceStore which is better tested and performs excellently.
2015-10-04 00:22:46 +10:00
Matt Joiner
efe294ac35
utp package merged PacketConn with Socket
2015-10-04 00:02:14 +10:00
Matt Joiner
23ee45e09f
fs test: Missed package specifier
2015-10-02 00:16:50 +10:00
Matt Joiner
126447260f
Fix import cycle
2015-10-02 00:16:25 +10:00
Matt Joiner
28c1536daf
bencode: When decoding a dict, if the final key is missing its value, don't treat that as an error.
...
I think I'm swayed here by the robustness principle/Postel's Law.
2015-10-02 00:13:43 +10:00
Matt Joiner
b7a8bb7570
Simplify the torrent Data interface
...
None of the methods are optional anymore. Removed the nasty wrappers for some data implementations. Moved data.Data back into the main torrent package. Should make it much easier to understand for people implementing their own Data implementations.
2015-10-02 00:09:04 +10:00
Matt Joiner
afece1f67f
Match the names used in other blob implementations
2015-10-01 15:41:30 +10:00
Matt Joiner
d8a43e1b03
Reduce UDP tracker response buffer size from 64KiB to 2KiB
2015-10-01 00:36:41 +10:00
Matt Joiner
58c997210e
Track peer sources with a dict, and don't exceed high water mark
2015-09-28 15:30:13 +10:00
Matt Joiner
53259397fc
Initialize connection piece priorities lazily, and using a pool
2015-09-26 17:27:35 +10:00
Matt Joiner
52b0705956
Include num pieces in torrent status
2015-09-25 22:05:32 +10:00
Matt Joiner
22428da0e3
Add packed IP list
...
This saves a lot of memory by allowing the IP blocklist to be mmap()ed in. In production with the latest level1 blocklist it's 35MB per process.
2015-09-23 18:25:22 +10:00
Matt Joiner
87158e594a
Derp
2015-09-20 21:09:55 +10:00
Matt Joiner
0fa547e292
Don't warn about zero port peers from trackers
2015-09-20 21:09:10 +10:00
Matt Joiner
8949375bd6
bencode: Decode very large integers as big.Int if they overflow int64
2015-09-20 21:08:42 +10:00
Matt Joiner
f9ed9c4c04
Avoid frequent allocation of piece request order iterator
2015-09-20 11:29:52 +10:00
Matt Joiner
31ce250a6b
Merge pull request #30 from therewillbecode/patch-1
...
Improved Word Flow
2015-09-17 22:18:01 +10:00
Tom
fe646f0810
Improved Word Flow
2015-09-17 11:56:45 +01:00
Matt Joiner
cd96dbcd9d
Tidy
2015-09-17 12:54:03 +10:00
Matt Joiner
afed0b7ce3
Add a test for dropping a torrent before it gets the Info
...
Really just to check the behaviour doesn't change, it was mentioned before but wasn't the actual cause of any problem.
2015-09-17 12:53:52 +10:00
Matt Joiner
11d703fbf1
Count failed chunk sends against a connection
2015-09-17 12:50:29 +10:00
Matt Joiner
9f324d04e2
Tweak logging
2015-09-17 12:40:35 +10:00
Matt Joiner
0113776f1d
Reduce noise about zero port peers
2015-09-17 12:39:51 +10:00
Matt Joiner
313adf1d2f
Some code missed in the last commit ಠ_ಠ
2015-09-06 12:35:56 +10:00
Matt Joiner
eebd09c0fe
Allow subscribing to torrent piece state changes
2015-09-06 12:33:22 +10:00