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

Fix this test

We require the full path to the file where the metadata
will be written to. Let's not make guess...

6683e91ad4cad61e547626a1dda38bf0d522d019 authored almost 4 years ago by Alan McGovern <[email protected]>
[core] Fix some bugs in metadata mode

There were some off-by-one errors and casting bugs.
I should add more tests covering this.

777926f0dae8bd617d90112ce95acb762545580a authored almost 4 years ago by Alan McGovern <[email protected]>
Remove spurious .vs cache directory.

a73c6ca1f6dfdeb062c2a236a307dbd31eefaf2c authored almost 4 years ago by Sam Hocevar <[email protected]>
Mono.Nat package update fix.

fcab9e71e5e29b5cbfee0427c2843d4025c490ca authored about 4 years ago by justscribe <[email protected]>
[core] Clean up local peer discovery a little

Remove an extra variable we don't need.

ad9424c674710b75086e3c5be4acf15d02e320dd authored about 4 years ago by Alan McGovern <[email protected]>
issue#322 Using MulticastIpAddress instead of IPAddress.Broadcast for initializing UdpClient in LPD

b56f07328e78fd6652646dbacb9ac3bb30e21449 authored about 4 years ago by Vladimir Strizhakov <[email protected]>
[core] Remove dead code from the encryption code

Clean up some code by adding the 'Async' suffix to
async methods, removing dead code, and ensuri...

8ac72bf6a92991b22862bb81f64185edd2c5a7d9 authored about 4 years ago by Alan McGovern <[email protected]>
[Core] Make it impossible to run two concurrent SendAsync

As per code comment - if ReceiveYAsync completes synchronously
it will immediately call SendAsyn...

86dc9a45bef3681a6ee7e33144eb1a568b27a47b authored about 4 years ago by Alan McGovern <[email protected]>
[core] Update Mono.Nat

0bcbd2566ff7b2d2f463c4b01fd04ae93110b265 authored about 4 years ago by Alan McGovern <[email protected]>
[core] Update ReusableTasks

This has an API break (methods were removed).

93d6eabc6223859086de05336ede963a6d860b9d authored over 4 years ago by Alan McGovern <[email protected]>
[core] Put classes in their own files

47d275e70b02a96be8649676d2166fc8840c436a authored over 4 years ago by Alan McGovern <[email protected]>
[core] Remove TrackerTier|TrackerTiers

Just use a simple IList<IList<string>>, or IList<string>
for these. No need to have funky wrappers!

5f50359b99191fbc86fd5df7eadca793c3ba2a35 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Do not close the file until we own it

If we call StopAsync while actively downloading we may
be writing to the file when we go to try ...

dccf9454b9da78b85c9d5efe717e7e97190b551e authored over 4 years ago by Alan McGovern <[email protected]>
[core] Fix a potential race in the partial hash cache

We should update the offset *after* we have finished
hashing data. This ensures that anything ca...

74f88df1804681a261be5411860e37d047444c43 authored over 4 years ago by Alan McGovern <[email protected]>
[core] These caches need to be accessed from the IO loop

8ba56448ed3330ea0bc1737889c310c6eac764f4 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Count connections without syncing to a thread

This approach is threadsafe and simple.

03a711e24eb5f45f9c276b7db40383fe6fe67228 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Hide 'TorrentFile' behind an interface and make it immutable

The main goal of this is to make ITorrentFile and Torrent immutable.
It also clearly separates t...

6a32c0c0421a05054361711ae41108821234988a authored over 4 years ago by Alan McGovern <[email protected]>
Update version number to 1,9,x and mark it as alpha

3f392c5d97f0db722c42747ac7fde890244d1583 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Fix the format string now that it uses interpolation

7373f73620b6143f118598c6f2b1ab73c14795f0 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Refactor ITrackerManager to be async friendly

Run CancellationToken through the tracker APIs. Add a cleaner
API for dynamically adding/removin...

5983972319b31ac1a33e30e27a39db9de891f853 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Add concurrency limiting for announces

If dozens, or hundreds, of torrents are started
concurrently then we should limit the announces
...

c95f30dc51d98a2d9b0e96ac96a75d5ee746d4b8 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Cache a buffer when receiving

We can now cache a buffer to re-use for our receive loop.
This reduces the amount of times we ha...

eb7d0d12a035754d659232351590ca73574567ce authored over 4 years ago by Alan McGovern <[email protected]>
[core] Allow sending messages to happen on the threadpool

This is a small tweak to allow significantly less context
switching while sending messages to a ...

23463ec8643d77adfd1e96783a3287228a676c43 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Begin receiving the next message before handling the received one

It's a little more efficient this way as we're reading from the socket
in parallel with actually...

edbd4c4348f76742644b4a55f59773afabbea936 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Keep buffers in separate pools based on usage

Buffers used to send/receive from sockets should be
stored separately to ones used to retain blo...

c54487729c220086042134c57721175d9ac4f462 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Hash the final block while on the threadpool

This is a bit better performance wise as the final
hash will be performed while on the threadpool.

c372d0ac9859bc00062a4ba682eb4647cf61db50 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Properly set the announce url in the creator

Ensure we have *either* an 'announce' key or an
'announce-list' key.

If all the tiers are empty...

ef43b13c4c4ef1cb0418dc7eb40e003c36da8e11 authored over 4 years ago by Alan McGovern <[email protected]>
[core] The hashing is now handled on a threadpool thread

This unblocks the disk io loop so it can process more
reads/writes concurrently.

b407b303c11d9aed6b1dd92bf0969200ce819b24 authored over 4 years ago by Alan McGovern <[email protected]>
[examples] Add a stress test

Spin up a few monotorrent instances and have them connect to
each other. It's the easiest way to...

574b514e26d32060d5eada107655e1e1412bb8dc authored over 4 years ago by Alan McGovern <[email protected]>
[core] Emit this event async

319d5b373dbe8870eb41bd34cc10c73093b36213 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Add some more logging

68ffa61c8b4d53f1f2202d33585c7d16e9266c12 authored over 4 years ago by Alan McGovern <[email protected]>
[core] update the logger again

f9a25f0802c42e34e1e8222b996d1149863941a1 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Fix a regression from the Tracker refactoring

We still need to pass the 'Peers' list into the event args.

Oops.

d406be2fed436a10dad0324c1fd514bc179cd516 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Move the logger factory inside Logger

f50cb4bb445cd278093b9c7d03b959ee1ee4d2dc authored over 4 years ago by Alan McGovern <[email protected]>
[core] Optimise returning a buffer to the pool

As this is controlled via an IDispoable now, we don't need
to verify the correct buffer is being...

8088114809a9d3dbafcb5a3c708f190dc71b1a64 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Add some more logging methods

3617f1dd9ae9c4f0c812b84d8c2f9ad493ca6acf authored over 4 years ago by Alan McGovern <[email protected]>
[core] Swap to the threadpool all the time

Now we're consistently on the threadpool regardless of
whether we need to test an encrypted conn...

39478ab67c7f335bb581dbd8fa712ac51213070e authored over 4 years ago by Alan McGovern <[email protected]>
[core] Simplify this as we don't use the return value

c25ab58a347f128ef33f8a846710a0ebc948c1b7 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Add a way of ensuring execution on the threadpool

f49c92387f8181f56ba594266756c02d49c6fe10 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Remove these old methods

Use the 'Async' ones nowadays.

56ef46cff9b657ebd2ef5dd9e868907de7deb3ed authored over 4 years ago by Alan McGovern <[email protected]>
[core] Move network IO and crypto to the threadpool

Now all the message encoding/decoding, encrypting/decrypting
as well as the actual network io ha...

50e6ab1a39c83b30abdfab7ce7871acafbdf721d authored over 4 years ago by Alan McGovern <[email protected]>
[core] Drop self-connections a little faster

We can drop them a little faster if we check peerid
while deciding if we should re-use the conne...

af244a24bbb1de741d01d6c741209f74984a41a7 authored over 4 years ago by Alan McGovern <[email protected]>
[sample] Redo the .NET core sample to include *.cs

7e637d38fc97c6f60be08986b09c033e3d032e41 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Update internal logging to be a little nicer

979f1280203c69bb5b4a0f832333db737a628af4 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Clean up HashAlgoFactory

Make it internal, and now that it's internal API we can simplify
it. We only ever want SHA1 and ...

117e0ab4ab98518ef2c572aec49935b58df21052 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Keep the file IO in the threadpool

The async methods are fairly awful perf-wise and appear
to do a lot of work synchronously (accor...

beff4ea8e7c0f55a52b55bfa622acf200a29dd39 authored over 4 years ago by Alan McGovern <[email protected]>
[core] The tracker server should listen for scrapes too

If we are listening at an endpoint which ends with
'/announce/' then we should additionally list...

d0b0edf9a3881bf577e7128e47c4618e278c2a59 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Remove IConnection2 and modify IConnection

This breaks the API for anyone implementing a custom
connection. They'll need to return a Reusab...

dfa0b875f02f7ecf6d9f2db45c837a9c7e43f401 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Make DiskManager and PieceWriter async

This is a relatively small change in the grand scheme
of things, but it allows for a few improve...

b43b4fc6730c93b82f030cb65be05537254e0807 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Store the SocketAsyncEventArgs with the byte[]

Make BufferPool return an object which allows us to
cache the SocketAsyncEventArgs alongside the...

4ab845eb45b4aee7d857a960d87dba2f2fceb67f authored over 4 years ago by Alan McGovern <[email protected]>
[core] Sending messages can reuse buffers now

53c382fdd3c93e9281046f1cf372dfdb43bb3339 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Add an extra error check to StreamProvider

If you have not called WaitForMetadataAsync and try to create a
stream, you must have passed in ...

6ccb739a0b36ead3e0b2336270f7d2414f10dde2 authored over 4 years ago by Alan McGovern <[email protected]>
Release this before breaking API

f360a69c53e319c801ee3e19f02f3e23ba456091 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Set a User-Agent header for announce/scrape

Fixes https://github.com/alanmcgovern/monotorrent/issues/314

Patch suggested by usikpavel

31c0027638ab39b9da0676b7faf0ee9b24b4dad6 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Wrap buffers in an IDisposable to simplify lifespan

Now we can wrap buffer usage in a 'using' statement in the
majority of cases, which is a neater ...

c63e0167f910ef9af1cd37c3d20d6ecabf05ba2c authored over 4 years ago by Alan McGovern <[email protected]>
Added a ClientApp property for Tracker Peer.

d7ee65799f55838cf6da9c3e24961b5ac0cb60c1 authored over 4 years ago by justscribe <[email protected]>
[tests] Update this test to be more correct

We cannot have proper piece picking in metadata mode as we do
not acutally know how many pieces ...

2f46531d3b6bfb485c9d1569b3e110d5ce2aad89 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Properly reset the IgnoringPicker for unhashed pieces

This should be created inside PieceManager like everything else.
This way when we swap between m...

b0ebad0edaccef03e4932e32436c1622010ed3e6 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Make these ReusableTasks

c51c8c211fc4ce91820f31e2ae0bbf2aa0f928fa authored over 4 years ago by Alan McGovern <[email protected]>
[core] More accurately track PeerIds in the Connected list

As soon as we create a PeerId we put it in the Connected list.
This means that if we are in meta...

0eddab2843d8cee4121e171b5e471bbba35d024c authored over 4 years ago by Alan McGovern <[email protected]>
[build] Add some more tags to the nuget package

e8bb197507df5e73858ad6a066f9381d6970b3f8 authored over 4 years ago by Alan McGovern <[email protected]>
[build] Bump the version for the next release

e04fc963d2ac6fcaed06115eb8ee2c5dbd7eca2a authored over 4 years ago by Alan McGovern <[email protected]>
[tests] Use an async wait instead of Thread.Sleep

c4b1460f001c781e5536fb929ff8a496c9bd95a7 authored over 4 years ago by Alan McGovern <[email protected]>
[tests] Use a random port for these tests

This reduces the chance of a collision when tests run
in parallel.

c845c631d726988c39d032a24590c8aad0e97a02 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Properly handle bitfield messages in metadata mode

We should ignore them when they're received. This is
implemented by special casing the situation...

b4b23a434a71063510dce2180a4cc328ff60a8f9 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Add tests ensuring MetadataMode preserves trackers

If you create a torrent from a magnetlink with trackers,
ensure those trackers are maintained as...

7400a9bbaa5fdde13dd5c28dc8e3b81a8e3e6e17 authored over 4 years ago by Alan McGovern <[email protected]>
adding tracker urls when torrent was loaded from magnet link

27b8ea5fd1c85ec5a03ce248348b83f94a5c3fac authored over 4 years ago by Aleksey Vlasenko <[email protected]>
[tests] Add some tests covering ConnectAsync

adc69a0edc605c4e40b76aee595d3aef6a47a7de authored over 4 years ago by Alan McGovern <[email protected]>
[tests] Add multitargeting for the tests

Now they can be trivially executed under .NET Core as
well as desktop .NET 4.7.2.

2723c118eebbcaa3184b93dc592ef031c71dd7ba authored over 4 years ago by Alan McGovern <[email protected]>
[core] Move to HttpClient as it's more modern

Also, the HttpTracker tests are flakey under .NET Core
as it appears to have a buggy implementat...

def1b62761eaf2f79fe9adadfd8aeed4caf494bf authored over 4 years ago by Alan McGovern <[email protected]>
[tests] Use TrySet instead of Set for this test

In the event there's a bug we may cancel the tcs in the test. When
this happens we don't want to...

7c4c7743b622274b1f9ce9a938d20a0f5636d353 authored over 4 years ago by Alan McGovern <[email protected]>
[tests] Throw a TimeoutException instead of an Assert.Fail

Sometimes we *want* to time out and do something with the
exception, so don't force tests to fai...

e133f2c5f7c7bbc7e8bcf66f37ee9cd2d95ae307 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Don't null ref unnecessarily

We can handle a null IDisposable :)

5a85faf6dd27124357dd29f6e63717d5767e64e2 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Make this method a ReusableTask

This typically fastpaths and exits early, so make it a ReusableTask
so it becomes zero-allocatin...

87faabbc69d640fd5bfc21168c33a3eb65299585 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Cache the SKeys in ListenManager

Save some repeated allocations by caching the array used
to hold the infohashes. We are likely t...

2e561f264b1da5e529377754a3d7b9d2c3c81341 authored over 4 years ago by Alan McGovern <[email protected]>
[build] Update Mono.Nat and ReusableTasks

bb678867f2ed6236b068378927548da0b6170ea3 authored over 4 years ago by Alan McGovern <[email protected]>
[build] Bump to 1.0.21 for the next release

69a07221f7a1927d8e567bb8ffb62814f50ea664 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Remove a useless method

b237c05416684079759d6c48f183ff28e715415a authored over 4 years ago by Alan McGovern <[email protected]>
[core] Avoid throwing an unnecessary exception

5d8c2fa043f73e9fb232587c7e8f3d1ac7e8ac30 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Ensure we always reset the SocketAsyncEventArgs

We should throw the pending exception after the args
have been prepared for reuse to avoid an in...

62cf0b8d75034f054b15eb8ccbbb3294a9c3b525 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Pull the max pending requests variable to a constant

It's needed in a few places, so ensure we set it consistently
and can easily tweak it in future.

4c2b1b1871e85383d4f6cf380726176211cb87b4 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Bugfix for pending requests for monotorrent < 1.0.19

If we receive a libtorrent extension handshake with no value
set for the max pending requests, i...

7e10938c844500b419bc389a7c7b592bec0a77dd authored over 4 years ago by Alan McGovern <[email protected]>
[build] Bump for the recent fix for incremental hashing

81c7255593b5406cb08d5dbc2e614206d359149f authored over 4 years ago by Alan McGovern <[email protected]>
[core] Ensure data is not mixed between torrents

Ensure the incremental hasher takes the torrent manager
as well as the piece index into account....

917d19f2b3b83cacd79c2465ee0c61d7d4eeeb41 authored over 4 years ago by Alan McGovern <[email protected]>
[tests] Fix a race condition in the new tests

The state changed event is asynchronous.

7dc9025275adbc1a4258ae2ae743aaece6aa3771 authored over 4 years ago by Alan McGovern <[email protected]>
Bump the version for a release

2f54e799dbf4931cd6d8dfee7bbb697af12198a3 authored over 4 years ago by Alan McGovern <[email protected]>
- Fix for DownloadMode.UpdateSeedingDownloadingState logic. Currently it sends multiple TorrentStateChanged events during download

c407ba02618254358398369424dc967445389b51 authored over 4 years ago by Aleksey Vlasenko <[email protected]>
[core] Properly initialize ExtendedHandshakeMessage.MaxRequests

Fixes https://github.com/alanmcgovern/monotorrent/issues/287

57f7c224fe5737cb64d2f65bc135586c5474a93e authored over 4 years ago by Alan McGovern <[email protected]>
Bump version to ship port forwarding support

ae2e4077a45a40de82d4294722abadd1cd12309a authored over 4 years ago by Alan McGovern <[email protected]>
[core] Build in port forwarding support

This support is built on top of Mono.Nat but can be swapped
to any other implementation if neede...

6537f170bd4ac91e2ee9ce07a6d8c643e758b02f authored over 4 years ago by Alan McGovern <[email protected]>
[core] Clean up more code from the Unchoker (#281)

Greatly simplify the code in ChokeUnchokeManager. We now run a review every minimumTimeBetweenRe...

c9b1ebca329e5d89ccdfc4bf2dff1de66c9673ed authored over 4 years ago by Alan McGovern <[email protected]>
[core] Add more tests for ChokeUnchokeManager

55a4b7f6c7ba49c687f223ca4c1fc6ebe81a411b authored over 4 years ago by Alan McGovern <[email protected]>
[core] Clean up the Choke and Unchoke methods

9cb51410bfc95f802848ae4485d729bfeca5af13 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Remove a method we don't need

661342853df67269b5db9ce980c1f3eaea90b5d7 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Temporarily disable InitialSeedMode

This is currently slower than regular seeding mode.
I'd like to fix this to avoid frequent choki...

b9ec887a9d77fad15e38a69ded641b7058230ae7 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Correctly handle TorrentSettings.UploadSlots == 0

If the TorrentSettings has set the upload slots to 0 it
is supposed to mean 'unlimited'.

This c...

ef171db11a542050bf4c85df85697071605b3779 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Cosmetic changes to clean up ChokeUnchokeManager

Remove lots of dead commented out code.

f13e073e0ee0ed65500f3e5dc071a07c8320e508 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Use a proper async method for Load(Uri)

This is better than Task.Run and then calling a
blocking API to download the data.

d7c1677531f1f0f43a48086ae17dd386ad77562d authored over 4 years ago by Alan McGovern <[email protected]>
[core] Misc cleanups

22fb6f12b0d54e3f64f0d7f9a2745656ba202470 authored over 4 years ago by Alan McGovern <[email protected]>
[core] Clean up VersionInfo a little

Simplify the code by making it throw an exception
if someone uses a 2 digit version number. As w...

6753f3e404ce33387e2cf119cb110e27e8109d76 authored over 4 years ago by Alan McGovern <[email protected]>