A peer to peer(P2P) file tansfer protocol to share data over the network where the peers can share or download files amongst the members belonging to same group.
- Synchronized trackers : Maintain metadata about the peers along with their group details,files shared, port and IP addresses.
- Parallel Downloading: Support for fast download with multiple pieces coming and downloaded from multiple clients simultaneously.
- Various modules for client such as create groups, list requests, stop sharing , Show downloads, logout etc.
SYNCHRONIZED TRACKERS:
- Maintain information of clients with their files(shared by client) to assist the clients for the communication between peers
- Trackers should be synchronized i.e all the trackers if online should be in sync with each other
- Client creates an account, register with tracker and login using the user credentials.
- Client can create groups, fetch list of all groups,request to join groups, leave groups, accept join requests(if owner).
- Share file across group: Share the filename and SHA1 hash of the complete file as well as piecewise SHA1 with the tracker.
- Download file:
1.Retrieve peer information from tracker for the file.
2.Download file from multiple peers (different pieces of file from different peers - piece selection algorithm) simultaneously and all the files which client downloads will be shareable to other users in the same group.
Ensured file integrity from SHA1 comparison
- Stop sharing all files(Logout)
- Whenever client logins, all previously shared files before logout automatically goes on sharing mode.
- g++ -o client client.cpp -lpthread -lcrypto
./client - g++ -o tracker tracker.cpp -lpthread -lcrypto
./tracker