Matt Joiner
8cdcbe9d40
Fix the tracker method receivers and names
2016-05-19 23:58:00 +10:00
Matt Joiner
7600ac70e3
Move torrent tracker methods into torrent.go
2016-05-19 22:49:37 +10:00
Matt Joiner
73a648fb32
Torrent.writeStatus: Include human readable torrent size
2016-05-19 17:15:10 +10:00
Matt Joiner
a69044b9ea
Break out KRPC stuff from dht into new package
2016-05-17 16:40:08 +10:00
Matt Joiner
95bb8a5eb3
dht.Server.query: Return nil Transaction if there's an error
2016-05-17 16:07:49 +10:00
Matt Joiner
2ca76cfea8
dht: Stop processing packet if server closes after unmarshalling
2016-05-17 16:07:03 +10:00
Matt Joiner
88d21ce627
dht: Don't contact nodes with an IP containing a leading octet of 0
2016-05-17 16:06:18 +10:00
Matt Joiner
2483c75f09
Improve dht.Transaction.SetResponseHandler comment
2016-05-17 16:04:33 +10:00
Matt Joiner
cf55055d12
Improve the note about chunk writing concurrency
...
Everytime I see memory spike I suspect this, and it isn't it.
2016-05-17 02:12:06 +10:00
Matt Joiner
869fb25cbc
Changes to missinggo resource package
2016-05-16 22:32:00 +10:00
Matt Joiner
c1e0d37266
Rename some storage funcs
2016-05-16 22:02:03 +10:00
Matt Joiner
02ea8b1081
Rename storage.I->Client
2016-05-16 21:50:43 +10:00
Matt Joiner
9b5d3cac03
Test both resource and file backends to piece storage
2016-05-16 20:11:00 +10:00
Matt Joiner
52e285ea86
Remove unused fields in testDownloadCancelParams
2016-05-16 20:10:33 +10:00
Matt Joiner
6f470a2d02
Don't log missing files during hashing
2016-05-16 19:50:46 +10:00
Matt Joiner
cbac2ecaff
Stop returning errors from the 2 callstacks to connectionLoop where errors are expected
2016-05-16 19:50:10 +10:00
Matt Joiner
c0283d3314
Return an error from Torrent.setMetadataSize
...
This should mean connections sending ridiculous metadata sizes get dropped.
2016-05-16 18:48:56 +10:00
Matt Joiner
d2951c6c4b
Move requestPendingMetadata onto connection from Client
2016-05-16 18:46:38 +10:00
Matt Joiner
0231beeac7
iplist/cmd/pack-blocklist use tagflag
2016-05-16 18:45:23 +10:00
Matt Joiner
61e43f4261
Add piece-per-resource storage
2016-05-16 18:44:58 +10:00
Matt Joiner
506ad00fd5
Probably fix test failure
...
Due to some changes in the Torrent instantiation code, I think there's a race in this test to verify the piece before counting the pending chunks. The torrent isn't supposed to be complete to begin with, so give it a bogus data directory to ensure it.
2016-05-12 12:44:51 +10:00
Matt Joiner
2b46a17b39
Bit of a tidy in the tracker code
2016-05-12 12:43:37 +10:00
Matt Joiner
b714da8184
Torrent.AddPeers can't fail, so don't return an error
2016-05-12 12:26:09 +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
67dbccff40
Update package doc
...
In particular, ConfigDir has gone away.
2016-05-11 21:53:42 +10:00
Matt Joiner
528836ab4c
Get rid of obsoleted Torrent.ceaseNetworking, and clean up Torrent.closing
2016-05-11 21:44:55 +10:00
Matt Joiner
dce3a7f675
Rework Client listeners
...
In particular, if the ListenAddr used a dynamic port ":0", and both TCP and uTP were enabled. If the TCP listen succeeded, and the uTP did not, the TCP listener was leaked, and another port number was not tried.
2016-05-11 21:11:52 +10:00
Matt Joiner
948552b282
Remove unused Client.pruneTimer
2016-05-11 21:08:55 +10:00
Matt Joiner
715a74985f
Wasn't using ChunkSize from TorrentSpec
2016-05-09 23:00:20 +10:00
Matt Joiner
c4a6f66a95
Lock now required around missinggo.Event variables
2016-05-09 16:44:06 +10:00
Matt Joiner
a45a09b877
Rework setting of info bytes
2016-05-09 15:47:39 +10:00
Matt Joiner
0aabd37e6e
Add some comments to file storage
2016-05-09 15:46:48 +10:00
Matt Joiner
cee49435e0
Add Client.AddTorrentInfoHash, and some other tidying
...
Remove Client.bannedTorrents, which shouldn't have been in use anymore. Also fix Client.newTorrent.
2016-05-09 14:37:29 +10:00
Matt Joiner
b8e1edef27
Remove the vestiges of the expose tracker Client interface
2016-05-09 12:20:35 +10:00
Matt Joiner
b9a7cbfa14
dht: Fix race contacting starting addrs in Announce
2016-05-07 19:02:30 +10:00
Matt Joiner
1d87653738
Fix dht.Server.Announce never stopping if the starting addresses can't be contacted
2016-05-07 18:58:43 +10:00
Matt Joiner
69643860ea
Move some behaviour into Client.newConnection
2016-05-07 18:57:38 +10:00
Matt Joiner
0fd73396fd
missinggo.Event changed, connection.writeOptimizer changes
2016-05-07 18:56:44 +10:00
Matt Joiner
d5d3d9f623
tracker: Skip DNS error in UDP test
2016-05-07 18:17:40 +10:00
Matt Joiner
9c36d36654
cmd/torrent-infohash update for API changes
2016-05-06 15:09:59 +10:00
Matt Joiner
b5812bb0b7
Remove the last of the "config dir" stuff
...
This just conflates the Client. It should be done orthogonally.
2016-05-05 23:05:28 +10:00
Matt Joiner
2d160b0419
metainfo.InfoEx.Hash becomes a function, UpdateBytes is added, and Bytes used in marshalling
...
Fixes #80 .
2016-05-05 22:40:38 +10:00
Matt Joiner
533f01147d
metainfo: Add HashBytes
2016-05-03 21:34:20 +10:00
Matt Joiner
e0451b0728
metainfo: Improve doc
2016-05-03 21:34:11 +10:00
Matt Joiner
bed302faa8
metainfo.Info.BuildFromFilePath contained unnecessary log, and didn't handle error correctly
2016-05-03 20:25:16 +10:00
Matt Joiner
3c612cbfc8
cmd/torrent-create: Tidy up flags and remove redundant function calls
...
Issue #80
2016-05-03 16:49:30 +10:00
Matt Joiner
f6b83130c9
Move a bunch of Torrent methods from client.go
2016-05-03 16:47:11 +10:00
Matt Joiner
d47ba4a08f
Rework handling of metadata data messages
...
There are some dubious logs probably resulting from poor ordering of some code for handling incoming metadata data messages.
2016-05-03 14:59:54 +10:00
Matt Joiner
726e763c46
Doc and logging improvements
2016-05-03 14:58:26 +10:00
Matt Joiner
8ae88151a8
cmd/torrent-metainfo-pprint: Add -files flag, and expose NumFiles and TotalLength in output
2016-05-03 12:51:31 +10:00