Hi I am Aditya Singh and this is my C++, Pthreads project.
This is a simple P2P (peer-to-peer) file sharing application that supports concurrent downloading. Peers can download different parts of a shared file simultaneously, making the download process faster.
- Concurrent downloading from multiple peers
- Simulated network latency and random data transmission delays
- Combined downloaded parts into a single file
- C++ Compiler (Supporting C++11 or later)
- Clone the repository:
git clone https://github.com/yourusername/mini-torrent.git - Navigate to the project directory:
cd mini-torrent - Compile the code:
g++ -o main main.cpp -pthread
- Start the mini-torrent:
./main - Enter the number of peers when prompted.
- Observe the downloading progress.
- After the download completes, check the
downloaded_file.txtfor the combined content.
// To complie use the folowing code:
g++ -o mini_torrent main.cpp -pthread
// The you can run the program with different options to test the concurrent downloading functionality.
For example: ./mini_torrent -n 5 -f myfile.txt