- Create a tracker file that contains atleast 1 address : ip:port
For compiling, include
-pthread
! - Execute tracker :
g++ -pthread -o tracker tracker.cpp
-->./tracker trckf.txt
- Execute peer :
g++ -pthread -o peer peer.cpp
--> - File transfer : If the current chunk recieved is less than the expected chunk-size, it is requested again till the correct one is recieved
./peer 127.0.0.1:8000 trckf.txt
- On peer, create user first, then login and then use other commands
- File can be downloaded from both seeders and leechers who are logged-in currently
- Piece selection algorithm : Selection of chunks in a round robin way to distribute the chunks equally among seeders and leechers
- User can directly join any group with join_group command
- The chunk-size can be changed to any size, transfer would be handled in every case
- Binary files can also be transfered
- One user cannot be logged in on different terminals
- In the same session, 2 users cannot login with same socket
- A peer cannot terminate abruptly (Ctrl+C)
- Group admin cannot leave the group
- If a user (not admin) leaves a group, all the files which are shared ONLY by him are removed from the group and also his name is removed from seeders of the group files. But locally the user will have those files so they will be shown during 'show_downloads' command.
- Tracker will always be active