Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/alanmcgovern/monotorrent

The official repository for MonoTorrent, a bittorrent library for .NET
https://github.com/alanmcgovern/monotorrent

[build] Update GitInfo to a listed package

For some reasons 3 versions of GitInfo (.22, .23 and .24) were all
delisted from nuget. Update t...

0af9c71e55926be20c35f6a36d7793af5050080f authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Ensure that Tracker.Status is reasonably up to date

Ensure the Status is updated appropriately for Http and Udp
trackers whenever we get an invalid ...

107ed9eeef1b9b7745b813f09a28ebd0f26ebda6 authored almost 5 years ago by Alan McGovern <[email protected]>
Fixed multifile metadatamode savepath handling, fixes mono/monotorrent#209 (#210)

* Add multifile metadata path test

* Fix savepath for multifile torrents on completion of met...

da5730bf0f69a59498d064cf16bf6da1c40d3c19 authored almost 5 years ago by Jean-Paul Mikkers <[email protected]>
[core] Update GitInfo so it no longer emits warnings

Expected failures (like probing multiple locations for
git.exe) no longer emit warnings when git...

0c37698570f4a7f864e847cdbfe342707a77dad0 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Version 1.0.11 for release

26e835fe547e65a85cd64b3e0e65a79fff7adb60 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] PauseAsync should work off the Mode

Don't check the State, just check the Mode :)

39bf65712e03c9074e8e1bf9ddae5e417cf26c20 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Robust loading of invalid torrents

Like most BitTorrent BEPs, the BEP for DHT is incredibly vague.
The only client which I can find...

b1f976a18fd42bef1c9c54a6bae654a3221283f6 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Add tests for pausing

Covers the fix in the previous commit

4f7383eff88546832d79d0989d996f78214df87e authored almost 5 years ago by Alan McGovern <[email protected]>
Fixes mono/monotorrent#207

25fa646adeef017d0b1dac440a735476699b6866 authored almost 5 years ago by jpmikkers <[email protected]>
[core] Ensure tracker scrapes/announces are fully async

When handling a tracker response we should read from the
stream asynchronously. As part of this ...

81ee615c66678c333a22659d931521f0e171bfe7 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Close the response if we time out

If we are expecting to receive data from the tracker's
response, then we should have a sanity/sa...

740a172d41bce20c28fbd80f559e50cc43e7b8c9 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Don't special case peers which are handshaking

Once a connection has been established to a remote peer, or
an incoming connection has been rece...

67977f5b46cc1c443062032ac7b9edb94b1df0a9 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Bump version for release

03236256ec1f215f0b89e9d71d138840062a346b authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Sanity check the bitfield length when connecting

Before we allow a peer to be added to the 'Connected' list,
ensure it's bitfield is of the corre...

aa2576067baa9a9b11390032400dab521298a45f authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Track piece availability better in InitialSeedingMode

When a peer connects we should use it's bitfield to check
what pieces are available rather than ...

fff50e2f3fede90b24b062efe77da989076bbf7f authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Ensure TorrentFile progress is always accurate

If a torrent is hash checked and a file is marked as
'do not download' then we skip that hash ch...

6c9b789a4a26157fbaa75a8f39bb73ace49d8d24 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] EndGameMode should continue to respect prioritisation

If a file is marked DoNotDownload we should continue to not
download it when in endgame mode. Ot...

6f488e68e363caed667ea47f54d2b8a42416cf08 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Ensure AmRequestingPiecesCount is accurate in endgame mode

When the final block in a given piece has been received we need
to remove the request from the l...

40458ce7c5afe1d9d85ead6201a8fa4305437e83 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Calling 'StartAsync' twice concurrently is an error

If a user calls 'StartAsync' and then invokes it a second time
without awaiting the original 'Ta...

732b02c3cb18ed261eda7c712e9b8db12fffb841 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Ensure DiskManager is not used after stopping

The aim behind this patch is to ensure asynchronous tasks
are properly ignored/cancelled when a ...

d19e8592dd667ade2ad28ce3525543c517bb5b68 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Fix the Pause/Resume events in HashingMode

We now report the correct state. Oops.

60052e3970f7472d6b7194fcf9672f224c808165 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Clear this list when stopping the manager

052d046bf0f858eaac41ef7bc575d8ed140cb375 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Add some internal documentation

Make it clear what the purpose of the two methods is

c647a5691d897e5b0f7fbfe85f23e979e40b82a0 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Update ReusableTasks and bump version for release

Second part of a fix for ReusableTaskCompletionSource

56fb7abca44f611271406ba9de00d5bad7a6b3d9 authored almost 5 years ago by Alan McGovern <[email protected]>
[build] Bump the version for release

2209922c4159e394242c6c337401571312642b6e authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Change how EndGamePicker is used

In normal mode we want to pick a random piece from the
list of rarest pieces. We additionally ta...

4180e350f05498fcb98370929c2120c3545e948c authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Set the groundwork to improve the endgame switcher logic

c9b260557bba8b074cfaa78cd16e59dbd51d4f0f authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Add tests for entering endgame mode in larger torrents

91b210b627e85dd234b2236277ee0e9f6ec44dc1 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Add some public methods to flush data to disk

This will ensure data is flushed to it's final storage.

6cfb59d58ae5716fee1227b3cce37c8bead5c9a6 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Calculate the 'best' number of threads to use

If there are not many pieces in the torrent, don't use threads.
At the very least each thread we...

b80eb77173b6997c2b6e8bfaa5119e21239d292a authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Use IPieceWriter to read/write instead of a FileStream

This restores the original behaviour of the class, except now it
creates one IPieceWriter per th...

ee8662c2adf1e710a8f3e465ad5e79bd168bb3fc authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Remove Task.Run from TorrentCreator

Let's start with the approach of refactoring the internals to use
async Task all the way through...

80cb7cb7142802e2e6b1241e5cb1bab9243253e2 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Rewrite the TorrentCreator to read and hash in parallel

This should give a bit of a speed boost. The use of 256kB
buffers for the file stream should min...

4ee8adf2a9fdb8f3c46382562d0eb7b0af68febe authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Re-enable webseeding

f76a720f622ebe98b5896684cf3e66eefc71fdd8 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Update the webseed tests a little

This ensures that HTTP connections are not accidentally
created for all the other tests.

Torren...

c39354f2bd3b7b901fc33b0ae862c5986ca69c0c authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Expose webseeding parameters to the clients.

Current default values match the previously hardcoded values for the webseeding
trigger timeout ...

149991f6db91f5fdfadb9f0e4fed179fa17ff790 authored almost 5 years ago by Sam Hocevar <[email protected]>
[core] Update ReusableTasks to fix a race condition

Hopefully fix https://github.com/mono/monotorrent/issues/181

480071c77b90bdaf9be0ec29329675edcb3c1dac authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Bump ReusableTasks to get better diagnostics

This new release will throw InvalidTaskReuseException if something
bad occurs, whereas previous ...

e1b90c6afcfc8e444893d31f6335ddffdc022a9d authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Gracefully handle receiving timed out messages

If a message has timed out and is not in our queue anymore,
don't throw a KeyNotFoundException, ...

eb8e35a0799885f9d74949b244ca51ffba9ec545 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Don't throw System.Exception out of laziness

Declare a ConnectionClosedException and throw that when an
IConnection indicates a connection ha...

383e4a2ebadce4a3c2398e8527835bb34580a1ed authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Ensure connections are closed before clearing lists

Fixes an issue reported in https://github.com/mono/monotorrent/issues/156
by sdluxeon.

ee981e04869c7e4a682926dde7748915db6eb9b4 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] And init the active requests correctly too

:)

e5f475ca73735512b43935677d318534977a0b87 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Fix initialization in EndGameSwitcher

When initializing we should ensure we always init both the
standard picker and endgame picker.

...

1fb56d769efd9743ce218e20a71ecfe79c4ff538 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Obsolete an unnecessary constructor in EndGamePicker

Existing binaries will continue to work as expected, though
the internal logic will calculate th...

b80528e0e778ebcf44cd3495c4e1647d402bea44 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Allow the connection timeout to be altered

Default it to 10 seconds, but allow users to override it
if *really* necessary.

0917c495ef2fb4709513efea25e32bf9aaffc1c3 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Connection timeouts should not be debugger dependent

If execution is being paused in the debugger then connections
are going to be closed regardless ...

cc522bfe31308ecaf018e52f36bad25a27abbeec authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Rename BufferManager to BufferPool

This is a better description of what the class actually
does.

bc4b4fe61707257f7b723a3542562a3f05d0f82d authored almost 5 years ago by Alan McGovern <[email protected]>
[tests] Fix the DiskManager.Tick overload used by tests

This iadvertently was running on the wrong thead. It should
be proxying to the IO thread.

Now i...

0295928a0ad6112bf0e5e7e064f6836f9fca664c authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Make auto piecelength detection a little nicer

Allow 8MB pieces as a default maximum now, and also use
some constants to make it a little cleaner.

2acf1f316a017c218e24179d594f0e853dbe5aef authored almost 5 years ago by Alan McGovern <[email protected]>
[tests] Ensure the TestWriter doesn't allow accidental overreads

This is an additional safety check to ensure logic internal to
the library never over-reads.

fb4fbcaabd4c17f7baac9170d28c3ac786d506e0 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Preserve the stacktrace when rethrowing an exception

e0faf64892c6260670d9d1c78cf52eea25b57f9f authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Add a sanity check to ensure ReusableTasks.dll is there

No-one will be able to create a ClientEngine if the dependencies
are missing. The FileNotFoundEx...

b3227b0237f9aae6e3397203d436d09f96ca1cda authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Do not ignore FileNotFoundException when discovering local peers.

The previous catch-all exception handling would enter an infinite loop when
for some reason Reus...

ce4bba0e8a8d8b4861947173279adf369e2d9031 authored almost 5 years ago by Sam Hocevar <[email protected]>
[core] Bump some dependencies

64ae50346df9d1fe8f76668da567ecb75ea8cebc authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Fix PieceLength auto-selection

3131dc53aae64e7425ae0b4f14a8c4726e526445 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Add a way to force execution to continue on a new thread

72f0296cf2ddad62f7959c2b49bf2e7be246228e authored almost 5 years ago by Alan McGovern <[email protected]>
[tests] Remove unused code from the creator tests

d5897131e8964be576fba7615289ee34293b155c authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Update nunit to 3.12.0

This fixes a bug where it would mis-report OperationCancelledException
when using Assert.ThrowsA...

6aa6a3729589a470910762ccb9492ba195da5a8e authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Cancel all pending requests when the piece has been received

In endgame mode ensure that *all* pending requests for a given piece
are cancelled if/when every...

8ecd2ef25976a99e5e751cefd52dace3cd6bfca1 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Don't wrap SocketConnection in two ReusableTasks

This was necessary before ReusableTaskCompletionSource<T> was
fully implemented. Now that it's c...

e1307302da1dc367caf03b9b817a0e393c11a542 authored almost 5 years ago by Alan McGovern <[email protected]>
[build] Bump the version for the next release

35f60c58add6fbe0a9ceff0fa97d9334c9049ac6 authored almost 5 years ago by Alan McGovern <[email protected]>
[build] Update the ReusableTasks dependency

7ff16b8badee3d8fe67c85f0487029c2fd6ddde4 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Pre-initialize the list with the correct size

We know how many items we'll be adding, so use the correct sized
list.

8f57650e299b0164b3dd739aab98b3bd69c0e479 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Remove the BusyPeers list

If they're busy we'll just drop them. If we receive their details
from a future tracker announce...

cb011364e8290683debf1c0fd2426985660b7feb authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Signal the waiter after the lock is released

Just to be sure there's no unnecessary lock contention.

e71b1cb729b5ab1c80f75d6099f869f538b20a62 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Prioritise peers discovered on the local network

It's better to use these, if we can!

5d68269a5cf2c34032e97819be366666bb34e33f authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Optimise have message sending for the common case

By default have suppression is not enabled, so we can create
one MessageBundle and send it to ev...

7ff4e8a9e61a8e99398bccf58cbfb7eff9a18455 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Use pooled buffers in the encryptor code

93d038eb5edc9f2a92ae8befcdb6d61c484af49b authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Don't keep too many Peer instances alive

On active swarms we could discover hundreds or thousands of peers.
If we only connect to 60 of t...

d7c8e401355d9b9a8442179f7d832e4a873b2570 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Don't use intermediate arrays in CompactPeer

We can write the short directly.

8b76aecb4147cdc55cd32d66c854c771b02a1b00 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Bump to 1.0.6

The next round of misc fixes is in! This should save a chunk
of memory when picking pieces.

8ac845a49edd12bcd555742063300defe55a598f authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Bump to ReusableTasks 1.0.0

Glorious!

5304f301272d0b70533fbebc596e371ee425cf38 authored almost 5 years ago by Alan McGovern <[email protected]>
[tests] Fix some license headers

1c0900992114ad4eeb3784da056a51b91e3517c8 authored almost 5 years ago by Alan McGovern <[email protected]>
[tests] Make these tests green against older mono versions

Mono ships a BigInteger implementation that doesn't strip leading
0s from the output. It's not f...

bfe865a4bae65d681480232ac82f8035bc20b809 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Reduce allocations from PieceManager

Don't allocate a new list every time we pick a piece. We
can pass in the existing list exactly a...

e007716ffd6b3082d1b9874e85fc710b692acbdc authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Ensure the extended handshake includes the listen port

3b781c5a8c2fb0779a011db4c51c7497d7b697f0 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Move class level buffers to method level

This should be a local variable. Note: we cannot use a buffer
from our pool for this as it is co...

d137391b56c960281b78ad1ee9dda242397e253d authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Do not cache old buffers longer than needed

If we are using a SocketAsyncEventArgs to wrap a buffer which
does not come from the pool, ensur...

61731cd43103cb5dad0a425ba96b90327e867a8f authored almost 5 years ago by Alan McGovern <[email protected]>
[tests] Always set an IP and a port for Peer Uris

This is in advance of adding sanity checks to the peer parsing
code to ensure we never accept pe...

b6127e5c6cb2d9a84772993dd987568de7839066 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Use pooled buffers in four more places

Sending/Receiving handshakes should use pooled buffers.

762e5a9c1aaed679fc3c5cc617dec2e587876e24 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Add tests on the BigEndianBigInteger fallback paths

Fix an IndexOutOfRange when dealing with 0.

Now the code paths for .net standard 2.0 and 2.1 ar...

67e593e93b6f757cda3d8214c25f2266c744c0db authored almost 5 years ago by Alan McGovern <[email protected]>
[dht] Reduce the use of BigIntegers

NodeId rarely needs a BigInteger, so avoid allocating one and retaining
it in memory.

9b07398593776b1d08620fb09e029ebe1e367a15 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Use static buffers for some RC4 encryption constants

Some things are const and are reused, such as the bytes for
'req1' etc. Rather than constantly c...

fcbab11f12755a9deecdaed63f1d3bc62cd5b443 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Ensure ConnectionConverter handles nulls

If a null connection is provided, it should return null instead
of wrapping it in a V1ToV2Converter

57c860a10e8a9707276134f4cf946d196036e4b0 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Don't cancel pending connects too soon when debugging

5c99d3075e565d83e40e0a42455c51e82ef03620 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Bump the version to make a new release

72e3ea87b223a68a66facfb11369a43d06275969 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Fix a regression in HashCheckAsync from 6b01976bc4c1

When the ability to pause/resume hashing was added it broke the
logic used by HashCheckAsync (tr...

634ac17138bfd18803615191e8d0619f637e7a68 authored almost 5 years ago by Alan McGovern <[email protected]>
[build] Don't create a zip file containing MonoTorrent.dll

MonoTorrent now depends on an external nuget, so we can't
create a self-contained zip file anymore.

3344cc72af287087afde9d349d3de79694fb8b2b authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Bump version to 1.0.4 now that ReusableTask is ready

77f69fc639ac48a52e67110e57b09f41e90f32e1 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Immediately retry peers if handshaking fails

If we successfully connect to a peer, but then the handshake fails,
we should retry immediately....

9ff1157de1452cf09eaa1ec7217619c9d27dd4eb authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Make this internal method private instead.

It's only called by this class, and it should only be called by
this class.

6e0145ad6febbc80110e9483d7b4b458925e5462 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Add a public way to query the half open connection count

00510c2a8c5230da9642acb9901335cc44f28d51 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Remove unused methods from MainLoop

8db184ac7341495b614f8c8332cc9f1f09e0e687 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Move to System.Numerics.BigInteger

The main difference is that the BigInteger I had previously
imported from the Mono source treate...

84cfd7b806ea46bbe61d34b861ff262328a0f65c authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Always look for the optimised BigEndian methods

Even if we have compiled for .NET Standard 2.0, the underlying
runtime we are executing on may b...

319baca4d4471646f719645c02c1f7f30ea46898 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Simplify this CompareTo implementation

34bac2d2ce2c6a10ac97c923b0f937d20b684271 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Move to IConnection2 to allow use of ReusableTask

This has been implemented in an API compatible way. Anyone
who has implemented IConnection will ...

2e2592eba20bebcad27808e7c303b6b396c2aea2 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Further small optimisation in SocketConnection

Disable ExecutionContext flow for the socket methods to reduce
allocations.

This is already don...

c3fab3169d5c8cae65c2671488c462ba36feb713 authored almost 5 years ago by Alan McGovern <[email protected]>
[core] Start using ReusableTasks to back the async methods

These are a custom task-like object which can be used for async/await
with significantly fewer a...

6d22bdb985003dba96b4783a9be12f939109ca01 authored almost 5 years ago by Alan McGovern <[email protected]>
[tests] Make this test reliable

The recent change to add the partial hash checking feature made this
test a little flakey. The m...

b9e4340b9c2de0edd5c7c06e75dcc9350c52f349 authored almost 5 years ago by Alan McGovern <[email protected]>