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
There's no need to manually call 'HandlePeerDisconnected' now.
This is called automatically as p...
This is a bit less ambiguous and confusing now. One
method is just for raising events, the other...
77a8a03b6c07bf58e5a45451467f7a0f87625596 authored about 2 years ago by Alan McGovern <[email protected]>
[tests] Stop the HttpListener as part of teardown
e3da4c22c4d966191b34cfa674365df3679df3df authored about 2 years ago by Alan McGovern <[email protected]>
Maybe there's a bug in the finalizer chain and it's
causing this crash during app shutdown:
The...
92b77f0b13bdadc8a764d096d5d14fa66ba61992 authored about 2 years ago by Alan McGovern <[email protected]>[core] Refactor how announce requests are handled.
72339231604f236d1d5e78e81b14c4ab5e7fbe11 authored about 2 years ago by Alan McGovern <[email protected]>b78a3604a431303ee1acb797b4444c83fd62a7e7 authored about 2 years ago by Alan McGovern <[email protected]>
01572c0b4b273f74b0a63cf0e1113310b1935332 authored about 2 years ago by Alan McGovern <[email protected]>
This should prevent unbounded memory usage by ensuring
all 'periodic' announces fast-path and ex...
Handle timeouts requesting metadata
420cb93d06d41e7c30609aceefdb8eade654f074 authored about 2 years ago by Alan McGovern <[email protected]>
These are short running tests, so don't bother init'ing
port forwarding support or DHT.
It's possible for the state to be 'Downloading' and
for 100% of the file to have been downloaded...
Bind directly to 127.0.0.1 instead of using +.
077e9ee6c56657499139dc3dc5c01c268c4d33a6 authored about 2 years ago by Alan McGovern <[email protected]>This should be accurately tracked in the 3 places it's used.
192f29e2a210aee3226fa462f44f2aa5c23727ce authored about 2 years ago by Alan McGovern <[email protected]>
If a block is requested from a peer when fetching metadata, or
when fetching the piece hashes of...
Integration tests
4269be6f3049e0367dcf173bec298a9e2a35d91e authored about 2 years ago by Alan McGovern <[email protected]>This should be accurately tracked in the 3 places it's used.
145b5df1cf63679d06e835e829b76ca91c54c62e authored about 2 years ago by Alan McGovern <[email protected]>
If a block is requested from a peer when fetching metadata, or
when fetching the piece hashes of...
This was a hack which shouldn't be in the public API.
There are (now!) two cases where we need a...
77c45a9aa402222fb93d33b51a245332f771fce7 authored about 2 years ago by Ben Origas <[email protected]>
083e9d98c22f10ead96443426935b324bf365264 authored about 2 years ago by Ben Origas <[email protected]>
b7adf31b842dc97151f110a9ed98d2fbd10e90b8 authored about 2 years ago by Ben Origas <[email protected]>
6e03e3d222f7e599453244598467393abd369017 authored about 2 years ago by Ben Origas <[email protected]>
More fixes for empty files
169865c26ce0e62b576f2f4cfc89c21978278775 authored about 2 years ago by Alan McGovern <[email protected]>
Empty files are always created on disk as part of starting
the torrent. This simplifies some of ...
WHen checking the hash of piece 0, we should skip past files
with a length of 0. This is importa...
The spec requires a dictionary to be there, even if it's empty.
qBittorrent also includes an emp...
Both BEP47 (padding files) and BEP52 (BitTorrent V2) introduce the
ability to request blocks whi...
As the underlying storage is a bencoded dictionary, whose
keys must be sorted, you *must* sort t...
[bep52] Fix creating v2 torrents with zero length files
eed0a6ef6d3f8cba553a46a2918d95d98aabe8ed authored about 2 years ago by Alan McGovern <[email protected]>
Zero length files should not have a root hash as they have
no data. Skip them!
Fixes https://gi...
18a7e84b8d37867967fa101cf627a3c64397d06b authored about 2 years ago by Alan McGovern <[email protected]>
The previous logic did not take into account the fact that
the first file could be empty, in whi...
This should be in the 'info' dictionary so it's part of
the infohash.
libtorrent also refuses to create torrents when all selected files have
a length of zero. As suc...
When peers are disposed, their message queue is also disposed, which
forbids new messages from b...
All of these arrays end up pinned as they're used for FileStream
or Socket reads/writes.
By all...
1e7b28bc3f2f395fbb0d482cb31440f4b1dc4a0f authored about 2 years ago by Alan McGovern <[email protected]>
It's better for samples to do things in the blessed way so that
people who replicate samples get...
We just want the octets of the ipaddress written to a Span<byte>
in network order. It's not hard...
0a33930856d3af802cabe483eac341d2bc6fa131 authored about 2 years ago by Alan McGovern <[email protected]>
Enqueue tasks in a List<T> rather than enqueuing them
with the threadpool. Should be slightly mo...
4c96cffcb7d22468c1abcc66f388068594149e9f authored about 2 years ago by Alan McGovern <[email protected]>
c49ad333051313bcaf1c4b777bf472c2cff3a9a1 authored about 2 years ago by Alan McGovern <[email protected]>
Small perf and memory optimisations
d63ceddd0cf271aeb08ed6a7a6fe07188bc7c79b authored about 2 years ago by Alan McGovern <[email protected]>
The power of type specialisation turns this dictionary lookup into
a simple method call. Zoom.
517ee0f9d24bd673294c779b83e8f7bdb367e92f authored about 2 years ago by Alan McGovern <[email protected]>
021633200763c03b8577871558b8cedb5db0e647 authored about 2 years ago by Alan McGovern <[email protected]>
21ec3afc8715170c07dd448138ad68aaac66e7d7 authored about 2 years ago by Alan McGovern <[email protected]>
We use List.Remove so we should ensure that we have a proper
Equals method so we don't fall back...
7ff2ee869c8cca4fa185e8f7f608bc5cc6a4aece authored about 2 years ago by Alan McGovern <[email protected]>
If we want a collection of the distinct peers which a piece was
fetched from, we should just use...
This makes things a bit more consistent. The most common usecase
of this was to check if the nul...
fcbb849fa7781115947930dd0d9f016dce96ba58 authored about 2 years ago by Alan McGovern <[email protected]>
Tidy up DiskWriter
95d482389e71baf36ec67d572e3aaaf15fb6117e authored about 2 years ago by Alan McGovern <[email protected]>0bd7f76bea5e9f5cbd5a01a1d5f46812edc1abe9 authored about 2 years ago by Alan McGovern <[email protected]>
7dc4779641b85d20f439434fee47351952dcac96 authored about 2 years ago by Alan McGovern <[email protected]>
Piecepicking works on segments, not blocks. They just care about
how many blocks there are in ea...
They're only used by tests
68b8fea43623f416f5b89aa3919569bb3a4bc45e authored about 2 years ago by Alan McGovern <[email protected]>Clean up the API a little
6eb7fce2fc9c8a57bdb02ead99853c7cd16ae0cd authored about 2 years ago by Alan McGovern <[email protected]>Fixup from prior reworking of this class.
cf278cdd2618e973ae2ea97a5663a0a3e538d110 authored about 2 years ago by Alan McGovern <[email protected]>70fa6e8b6bb6640fa0d884bce263b5b8b68989b0 authored over 2 years ago by Alan McGovern <[email protected]>
a8ab485858cd90293f047286a6571c2e6e3da982 authored over 2 years ago by Alan McGovern <[email protected]>
6028eef19a9b49a7ef2c93876bd844baf3fa6244 authored over 2 years ago by Alan McGovern <[email protected]>
Migrate to a yaml based solution [skip ci]
b2fa7469cb984fa09a4bbff833c304866f5170ce authored over 2 years ago by Alan McGovern <[email protected]>b9d8681451ebbbcf34cdc9876d672065fd43f230 authored over 2 years ago by Alan McGovern <[email protected]>
Fix a bug whereby the 'most recent request' wasn't cleared correctly
if two peers were tasked wi...
This works for me :)
748aef04f3873348fd40389ff8f0c0631999bc72 authored over 2 years ago by alan.mcgovern <[email protected]>
We should cancel all pending requests before disposing the message
queue.
Also expand the API for IUriStream/IHTTPStream to better support
using + or * as part of the HTT...
[core] Make the Http streaming uri configurable
888e39a62a5724d1c673f3326bf2ac06b42fd04f authored over 2 years ago by Alan McGovern <[email protected]>
THe library can now be configured to use any ip or port when
setting up the HttpListener to serv...
Fixes a buggy test.
beb6930ce1f568c6b7d1ee803b43eb3034b7945b authored over 2 years ago by Alan McGovern <[email protected]>
This will make the framework version selector automatically
choose 5.0 when working within the IDE.
542fed2c434325e46f69fe6ffe1336b9f5a3e20c authored over 2 years ago by Alan McGovern <[email protected]>
224728409d7a183cabb68a3c5cf2cfaf79123a09 authored over 2 years ago by Alan McGovern <[email protected]>
f3d05ffe4d3a6c94163f2bb86542411612e612d4 authored over 2 years ago by Alan McGovern <[email protected]>
9b3a29687fd25b2f044324833bf16212117587e5 authored over 2 years ago by Alan McGovern <[email protected]>
[core] Cache bittorrent v2 hashes after retrieving them
e78ebfa66f0926642b715ab3e91fafc49b5b7cc8 authored over 2 years ago by Alan McGovern <[email protected]>
If a V2 (or hybrid) magnet link is used and the v2 hashes are missing,
then we will fetch them f...
[dht] Fix a DHT initialization issue
56d4bcc4d95cdcf93cd1117e5e4c93b53f521f51 authored over 2 years ago by Alan McGovern <[email protected]>Handle adding nodes to the engine before calling StartAsync.
36ae567e32112d9f51cf75e827da4490a72d3a87 authored over 2 years ago by Alan McGovern <[email protected]>848d1ad06a0c2364f645d1c25e7e3b4c1ca38458 authored over 2 years ago by Alan McGovern <[email protected]>
Further tweaks to message queue to finally add the disposes
which are needed to avoid losing buf...
Oops :)
Now these are cached correctly!
e49ee9773dd8f76c37e706fd3af4247de3204bfa authored over 2 years ago by Alan McGovern <[email protected]>
Ensure we don't keep peer info alive forever at the end
of a cached/reused array.
If there are any pending sends/receives, ensure we dispose
them and release them back to their c...
We can glob these together so we don't send N messages twice
every second.
561369b72ceef420227d9e86e5955475a2a52f73 authored over 2 years ago by Alan McGovern <[email protected]>
This ensures that the delayed announce, the one that
occurs when the engine completes initializa...
Both the V1 hash and the truncated V2 hash should be addded
as skeys.
For hybrid torrents we will need to be able to distinguish
between V1 and V2 pieces.
V1 peers c...
4cb2449c86fda2877bcc7e6a761d7ed2b26fbf56 authored over 2 years ago by Alan McGovern <[email protected]>
If we receive a truncated infohash we should have an easy way
to expand it into the full 32byte ...
Rely on PeerInfo as the public interface for peers which have
no active connection.
PeerId is s...
fc64c0192d88ae823d082566fcd84da7f049aef3 authored over 2 years ago by Alan McGovern <[email protected]>
Add some DEBUG only thread checks to ensure that dht related
tasks are really executing on the c...
[core] Optimise TorrentCreator performance
7ccfa968b344986acad6392a710f2ac6b9270b4f authored over 2 years ago by Alan McGovern <[email protected]>
Use some fancier threading here to ensure disk IO happens in
parallel with hashing data.
We need to be on the correct thread for this. Do not use a
ConfigureAWait (false) or there will ...
Increment a count when the lock is acquired, and decrement it when
it's released.
If the lock i...
c7a12ec9660eb9bd16f474fc300d36bf428369a2 authored over 2 years ago by Alan McGovern <[email protected]>
Add a simple method to calculate and return the merkle root
of a given set of hashes.
ae314f5d19c7e751fe850af72cd6b2cc8b98e317 authored over 2 years ago by Alan McGovern <[email protected]>
Add support for creating V1/V2 hybrid torrents, and V2 torrents
c8cc7f03cc235cb4e80d4af2867728a837e27b70 authored over 2 years ago by Alan McGovern <[email protected]>