Skip to content

adityaS011/Cpp-Mini-Torrent-with-Concurrent-Downloading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Hi I am Aditya Singh and this is my C++, Pthreads project.

Description

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.

Features

  • Concurrent downloading from multiple peers
  • Simulated network latency and random data transmission delays
  • Combined downloaded parts into a single file

Dependencies

  • C++ Compiler (Supporting C++11 or later)

Installation

  1. Clone the repository: git clone https://github.com/yourusername/mini-torrent.git
  2. Navigate to the project directory: cd mini-torrent
  3. Compile the code: g++ -o main main.cpp -pthread

Usage

  1. Start the mini-torrent: ./main
  2. Enter the number of peers when prompted.
  3. Observe the downloading progress.
  4. After the download completes, check the downloaded_file.txt for the combined content.

Code Example

// 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

About

In this mini-torrent project, I created a simple P2P (peer-to-peer) file sharing application. The application will support downloading files from multiple peers concurrently using threads. Peers will directly exchange data with each other.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages