-
Notifications
You must be signed in to change notification settings - Fork 1
Features
- Single file torrents download ✅
- Single file torrents seeding ❌
- Multi file torrents download ❌
- Multi file torrents seeding ❌
- Trackers HTTP ✅
- Trackers UDP ✅
Multi file torrents download: pieces is a unique string of SHA-1 hash values. So, if we have a torrent of 3 files, pieces is made by hash values of the 3 files concatenated. The problem here is that a single piece could be partitioned between 2 or more files, so it is required a more sophisticated file handler than the one already used for single file torrents.
Single file torrents seeding: we concentrated on downloading a file, not seeding, so there is no implementation for seeding (yet). Here is an idea for doing it: after completing the handshake, the client send the bitfield to the peer. If the client receive a REQUEST message, a function could simply read the requested block piece (with ifstream) and then send it with a PIECE message.
Multi file torrents seeding: the problem is similar to multi file torrents downloading. The hard part is handling pieces that can be splitted in 2 or more files.
Tracker UDP: the tracker UDP protocol is implemented but there's no operation timeout. This means that if a tracker is offline, the user have to wait for the system socket timeout (usually 2 minutes).