moham96 / dtorrent_task Goto Github PK
View Code? Open in Web Editor NEWThis project forked from eclipseglory/torrent_task
Bittorrent download client
License: BSD 3-Clause "New" or "Revised" License
This project forked from eclipseglory/torrent_task
Bittorrent download client
License: BSD 3-Clause "New" or "Revised" License
sometimes the utp peer crash with this exception
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (length): Invalid value: Not in inclusive range 0..576460752303423487: -40608
#0 new _List.filled (dart:core-patch/array.dart)
#1 UTPSocketImpl.newSelectiveACK (package:utp_protocol/src/utp_socket_impl.dart:851:19)
#2 UTPSocketImpl.sendPacket (package:utp_protocol/src/utp_socket_impl.dart:1006:26)
#3 UTPSocketImpl.requestSendAck.<anonymous closure> (package:utp_protocol/src/utp_socket_impl.dart:881:12)
#4 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
#5 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
#6 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
#7 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
this looks like a race condition or incorrect calculation of seq numbers, in any case i don't have reproducible steps for this crash, it happens rarely on my machine that makes it hard to debug and trace
I don't know why it occurs.
Dart Socket ERROR: ../../third_party/dart/runtime/bin/socket_win.cc:194: `reusePort` not supported for Windows.flutter:
some problem related mostly to the streaming feature:
1- This line and the pipeline that it is calling are causing degradation in performance because the functions involved in pushing the bytes like _calculateLastDownloadedByte
are time consuming.
dtorrent_task/lib/src/file/download_file.dart
Line 213 in c87eb30
2- currently streaming is not very responsive because the read request has to wait before it is processed and returned
3- non flushed pieces are not read, because we are using 2 different file handles, one for writing and one for reading, and the reading handle will not be able to read non flushed bytes
4- since we are using different handles for read and write, we should have two streams to handle read and write requests
Upon analysing the terminal I realised that all data is only being downloaded from one Peer here it is 66.42.170.16 and it is not being connected to any other
[_TCPPeer] Sending have information to the peer: [0, 0, 0, 0], 227
[_TCPPeer] Received request for Piece (228, 147456) content, downloaded 59473920 bytes from the current Peer PeerType.TCP 66.42.170.16:5988
[_TCPPeer] Received request for Piece (228, 163840) content, downloaded 59490304 bytes from the current Peer PeerType.TCP 66.42.170.16:5988
[_TCPPeer] Received request for Piece (228, 180224) content, downloaded 59490304 bytes from the current Peer PeerType.TCP 66.42.170.16:5988
[_TCPPeer] Received request for Piece (228, 196608) content, downloaded 59523072 bytes from the current Peer PeerType.TCP 66.42.170.16:5988
[_TCPPeer] Received request for Piece (228, 212992) content, downloaded 59523072 bytes from the current Peer PeerType.TCP 66.42.170.16:5988
[_TCPPeer] Received request for Piece (228, 229376) content, downloaded 59555840 bytes from the current Peer PeerType.TCP 66.42.170.16:5988
[_TCPPeer] Received request for Piece (228, 245760) content, downloaded 59555840 bytes from the current Peer PeerType.TCP 66.42.170.16:5988
Currently testing the streaming feature i see that the http server is causing the download task to lag and the whole app to have a lag.
The code should use concurrency when possible, for now especially the http server used for streaming videos should run in it's own isolate
Here's my code: rss_download_card.dart
When load widget,the progress is 0,and when run freshProgess
,the progress is still 0
.
May be my code is somewhere wrong
Because every version of flutter from sdk depends on meta 1.11.0 and events_emitter2 >=1.0.3 depends on
meta >=1.9.0 <=1.10.0, flutter from sdk is incompatible with events_emitter2 >=1.0.3.
And because dtorrent_task >=0.3.3 depends on events_emitter2 ^1.0.3, flutter from sdk is incompatible
with dtorrent_task >=0.3.3.
So, because deckr depends on both dtorrent_task ^0.3.3 and flutter from sdk, version solving failed.
I have 0.3.3, but it doesn't have:
export 'src/stream/stream.dart';
export 'src/stream/stream_events.dart';
export 'src/task_events.dart';
Do you need to post the latest to pub.dev?
I noticed that if I try to download a file twice, the second time it doesn't work.
I found this state file: 51eb9f733ceb792822d6cfa62b0a033b7b3732b1.bt.state
If I delete that it works. What is this and do I need to delete it everytime?
Currently the speed of utp peers are suboptimal
It would be best if there is a sequential download option
The code is as follows:
I noticed that after running for a while, the following code never seems to hit breakpoints (based on my understanding, the BT protocol should obtain usable nodes from here).
The current situation is that I can only initiate downloads using torrent files with initial nodes.The console output logs are as follows.
I only see downloading through torrent, or is there a way to convert magnet links to torrent first?
seeing all this in the console. How turn off?
[_TCPPeer] Sending bitfile information to the peer: [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
[_TCPPeer] process have all : 192.228.165.219:51414
[_TCPPeer] remote unchoke me : 192.228.165.219:51414
[PeersManager] Processing Extended Message handshake
[_TCPPeer] Connection is closed 77.99.176.239:23710
[PeersManager] registering extensions for peer 77.99.176.239:23710
[_TCPPeer] Sending bitfile information to the peer: [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]
[PeersManager] Processing Extended Message handshake
[_TCPPeer] remote choke me : 179.9.167.86:48486
all in the title
I tried this torrent and it seemed to churn for hours, but didn't work? I maybe wrong, but wanted you to test it to confirm.
Using this library how can I create the torrent (and seed, as the creator will be first seeder) from a file in my system, and download that file in another system. Upon googling I found out that I need to make a SHA1 hash out of info dictionary of the torrent, and when I looked into the code of dtorrent_task, I found out it expects parameters like 'name', 'path', 'file' to properly make the dictionary (under the function parseTorrentFileContent).
Am I on the right track? Is it possible to create a torrent using this library? If not, then how could I do it in dart?
Currently the program is using a bit too much CPU due to multiple reasons:
we should try to avoid the use of collection functions since most of them has O(n) complexity, this needs quite a bit of research and testing since it may require testing alternative data structures or maybe roll our own data structures.
we should reduce the amount of I/O usage and save the piece in memory before writing to file, validating the piece before that.
we should investigate the possibility of caching the files in memory because reading a block each time we want to upload is expensive, maybe we need to use mmap
which is not possible out of the box in dart right now
decouple the parts of dtorrent_task like PeersManager
, Peer
, PieceManager
and DownloadManager
similar to how the webtorrent and peerflix are structured
implementing webrtc peers will make this library run in the browser as well
hi @moham96
im trying to use torrent downloading plugin d_torrent_task but im unable to download the file
this is my code https://github.com/PURUSHOTHAM-REDDY-N/Flutter-video-player/blob/master/lib/src/pages/downloads_page.dart
please check it once and this is my log
please help me with this.
as the name suggests, the torrent doesn't stop seeding and i have no idea why. I'm on the latest from pub.
I dug though the task.dart file and did find that there is a bool for a force mode but it cannot be called and is always set to false. might fix it if it was made to be toggle-able.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.