{"id":24915202,"url":"https://github.com/punitkumar4871/p2p_realtime_simulation","last_synced_at":"2025-03-28T06:24:38.533Z","repository":{"id":256944818,"uuid":"856877902","full_name":"punitkumar4871/P2P_realtime_simulation","owner":"punitkumar4871","description":"This project simulates Peer-to-Peer (P2P) file sharing in real-time using sockets and threading in Python. The main goal is to enable clients to share files directly with each other over a network, without relying on a central server. The project demonstrates efficient file transfer through socket communication, utilizing multithreading to manage m","archived":false,"fork":false,"pushed_at":"2025-01-24T17:54:22.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T07:16:39.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/punitkumar4871.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-13T11:31:48.000Z","updated_at":"2025-01-24T17:55:16.000Z","dependencies_parsed_at":"2025-01-24T18:37:07.373Z","dependency_job_id":null,"html_url":"https://github.com/punitkumar4871/P2P_realtime_simulation","commit_stats":null,"previous_names":["punitkumar4871/p2p_realtime_simulation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punitkumar4871%2FP2P_realtime_simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punitkumar4871%2FP2P_realtime_simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punitkumar4871%2FP2P_realtime_simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punitkumar4871%2FP2P_realtime_simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/punitkumar4871","download_url":"https://codeload.github.com/punitkumar4871/P2P_realtime_simulation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245980295,"owners_count":20704092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-02T07:16:41.209Z","updated_at":"2025-03-28T06:24:38.503Z","avatar_url":"https://github.com/punitkumar4871.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P2P Real-time File Sharing Simulation 🖥️📂\n--- \n\nThis project simulates Peer-to-Peer (P2P) file sharing in real-time using sockets and threading. The primary goal of this project is to allow clients to share files with each other efficiently in a peer-to-peer network.\n\nhttps://github.com/user-attachments/assets/7f3f2614-83f0-400a-b174-aad22ff66bfb\n\n## 🚀 Features\n- **P2P File Sharing**:  \n  Share files directly between clients in real-time without relying on a centralized server.\n  \n- **Socket Communication**:  \n  Utilizes Python's socket programming to establish a direct connection between peers and transfer files.\n\n- **Multithreading**:  \n  Implements threading to handle multiple file transfers simultaneously, ensuring smooth and efficient data exchange.\n\n- **User Interface**:  \n  Basic command-line interface (CLI) for file sharing initiation and progress.\n\n---\n\n## 📂 Project Structure\n```\nP2P_realtime_simulation/\n├── client.py          # Client-side code for connecting and sharing files\n├── server.py          # Server-side code to initialize the P2P network\n├── README.md          # Project documentation\n├── requirements.txt   # Required Python packages\n└── assets/            # Folder for additional assets (if applicable)\n```\n\n---\n\n## 📦 Installation\n\n1. **Clone the Repository**:  \n   ```bash\n   git clone https://github.com/user-attachments/assets/7f3f2614-83f0-400a-b174-aad22ff66bfb\n   cd P2P_realtime_simulation\n   ```\n\n2. **Install Dependencies**:  \n   Use the `requirements.txt` to install necessary Python libraries:  \n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Run the Project**:  \n   Start the server and client on separate terminals or machines:  \n   - Run the server:  \n     ```bash\n     python server.py\n     ```\n   - Run the client:  \n     ```bash\n     python client.py\n     ```\n\n---\n\n## ⚙️ How It Works\n- **Client-Server Interaction**:  \n  - The server is responsible for initializing connections and managing peers.\n  - Clients can connect to the server, search for other clients, and start file sharing through direct socket communication.\n\n- **Multithreading**:  \n  The client-side handles multiple transfers simultaneously using Python's `threading` library, allowing efficient file sharing without blocking other operations.\n\n---\n\n## 🛠️ Technologies Used\n- **Python**: Core programming language.\n- **Sockets**: For real-time communication between clients.\n- **Threading**: To handle multiple simultaneous connections.\n  \n---\n\n## 📝 Future Enhancements\n- **Graphical User Interface (GUI)**:  \n  Implement a GUI to simplify the user experience and provide better feedback.\n  \n- **File Integrity Check**:  \n  Add file integrity checks (e.g., hashing) to ensure files are transferred correctly.\n\n- **Encryption**:  \n  Add security features to encrypt files during transfer for enhanced privacy.\n\n---\n\n## 🤝 Contributions\nContributions are welcome! Feel free to fork the repository, create an issue, or submit a pull request.\n\n---\n\n## 📜 License\nThis project is open-source and available under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunitkumar4871%2Fp2p_realtime_simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpunitkumar4871%2Fp2p_realtime_simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunitkumar4871%2Fp2p_realtime_simulation/lists"}