Matt Joiner
bb77502eab
data/file: Return EOF on reads past end
2016-02-17 17:58:20 +11:00
Matt Joiner
0acad8eeac
Avoid error message when we attempt to complete a piece that's already complete
2016-02-17 17:21:03 +11:00
Matt Joiner
c89a391056
data/pieceStore: Incorrectly public PieceCompleted method
2016-02-17 17:10:34 +11:00
Matt Joiner
65fd332afd
Use Cache.StatFile to get piece length in the backend
2016-02-10 00:48:23 +11:00
Matt Joiner
3acdcc3b45
Tidy code
2016-02-04 15:04:46 +11:00
Matt Joiner
5dabd3ed03
dataBackend/http: Replace connection pooling code with forced HTTP2
2016-01-06 12:10:40 +11:00
Matt Joiner
a0f374ce8d
Check piece completion state as soon as a handle to torrent data is obtained from a piece store
...
This helps flex the new concurrency implementation in the piece store http backend
2015-12-25 01:33:10 +11:00
Matt Joiner
08f8d7bd19
Limit parallelism at the piece store http backend connection level instead of at the request level
...
This is in preparation for improvements that HTTP2 should provide.
2015-12-25 01:31:50 +11:00
Matt Joiner
674066c448
data/pieceStore/{blob->data}.go: More appropriate file name
2015-12-25 01:26:15 +11:00
Matt Joiner
812f5af66b
Switch from launchpad.net/gommap to github.com/edsrzf/mmap-go for Windows support
...
Fixes #45 .
2015-12-23 03:50:34 +11:00
Matt Joiner
b66aa07a4d
data/pieceStore: Improve error message when pieces fail to write
2015-12-11 03:05:40 +11:00
Matt Joiner
8c37ff73af
CopyURL moved to httptoo
2015-12-11 03:02:45 +11:00
Matt Joiner
b3ed8ca09e
data/pieceStore/dataBackend: ErrNotFound now aliases os.ErrNotExist
2015-11-13 22:35:18 +11:00
Matt Joiner
4f03dd3fc7
httpfile.Open can now return an error
2015-10-30 22:21:48 +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
c7cb1009a5
Fix #33 .
2015-10-20 17:53:12 +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
126447260f
Fix import cycle
2015-10-02 00:16:25 +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
50ce70c47a
Fix locking in data/blob
2015-08-03 14:24:59 +10:00
Matt Joiner
665e3c72fc
AccessTime helper moved to missinggo
2015-06-01 18:26:32 +10:00
Matt Joiner
d87ae4f6a9
data/blob: Tidy error handling in WriteSectionTo
2015-05-20 22:21:20 +10:00
Matt Joiner
dfada8514e
Fix panic on unexpected files in the blob store "completed" directory
2015-05-16 10:52:35 +10:00
Matt Joiner
c5208569ca
Apply sortimports
2015-04-30 00:31:34 +10:00
Matt Joiner
526d9d738e
Rewrite imports to local bencode and metainfo
2015-04-27 14:55:01 +10:00
Matt Joiner
28b299e7c8
Rework the Torrent Reader interface, to allow reader options, and add "responsive" as one such option
...
Had several weeks of testing. Removes a lot of the "helper" reading methods, but this was necessary to allow per-Torrent reading options.
2015-04-14 23:59:41 +10:00
Matt Joiner
1ce84f664e
Fix a few minor data races
2015-03-30 23:10:37 +11: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
a451bc7e6d
Handle data going missing
2015-03-18 18:35:22 +11:00
Matt Joiner
28455fb817
Speed up stuff relating to checking piece completion
2015-03-18 18:34:35 +11:00
Matt Joiner
8d58fc28f6
data/blob: Change store eviction to LRU, from random replacement
...
It works *much* better for torrenting with a readahead window. When we want to
avoid downloading, we want to avoid downloading lots of dispersed pieces.
2015-03-18 18:12:46 +11:00
Matt Joiner
e6fbde0dc6
Rework piece completion
2015-03-11 02:41:21 +11:00
Matt Joiner
ad6ac3f2cd
More cleaning of public interface
2015-03-08 17:28:14 +11:00
Matt Joiner
3e753bb8ad
Change up the data storage interfaces a bit
2015-03-07 17:11:45 +11:00
Matt Joiner
63361b7b47
Extraneous import
2015-03-01 15:19:35 +11:00
Matt Joiner
4eb70e0673
Support opening handles to Torrent and File
2015-03-01 14:32:54 +11:00
Matt Joiner
a2d69b4931
Make blob data stateful
2015-02-27 12:45:55 +11:00
Matt Joiner
8f744300cc
Add piece blob torrent.Data storage, and move testutil to internal/, add basic transfer test for Client and blob
2015-02-27 01:46:02 +11:00
Matt Joiner
0eb418360b
Allow configuring Client torrent data opener, config dir, disabling metainfo cache, and prune with a timer instead of goroutine
2015-02-25 14:48:39 +11:00
Matt Joiner
4b1b009049
Encapsulate torrent data, and provide os.File and mmap-based implementations
2015-02-10 00:14:52 +11:00