Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 

Repository files navigation

P2P Chat and File Sharing Application 🚀

Demo.P2P.mp4

Overview

This project is a peer-to-peer (P2P) messaging and file sharing application written in C for Windows using Winsock2. It enables multiple peers to communicate by sending text messages and transferring files by splitting them into chunks. The application uses ephemeral ports for outgoing connections.

Features

💬 Text Messaging

  • Send & Receive Messages: Communicate effortlessly with peers by sending text messages.

image

🔍 Query Active Peers

  • Active Peer List: Retrieve a list of all peers that have interacted with your port. Screenshot 2025-02-22 225151

❌ Exit from Network

  • Graceful Disconnect: On exit, notify all connected peers and remove your port from their active peers list for a clean shutdown. Screenshot 2025-02-22 223032

Bonus Features

🌟 Connect to Active Peers (Broadcast)

  • Broadcast Messaging: Send a broadcast message to all active peers. Once received, these peers add your connection to their local peer list, expanding your network.

    Screenshot 2025-02-22 224004

📁 File Transfer

  • Large File Sharing: Transfer files between peers by splitting them into chunks, enabling support for large file sizes without overwhelming the network.

Screenshot 2025-02-22 224427

📥 Installation & Setup

🛠 Requirements

  • Operating System: Windows OS (required for Winsock2 API)
  • Compiler: C Compiler (MinGW)
  • Dependencies: Winsock2 library (included with the Windows SDK)

💻 Compiling & Running

  1. Clone the Repository:
    git clone https://github.com/Arihant779/P2P_Chature_Bhature.git
  2. Compile the Code
    gcc -o p2p_chat main.c -lws2_32
  3. Run the Application:
    .\p2p_chat.exe
    

🔗 Authors

Name Roll Number
Arihant Jain 230001009
Tanishq Godha 230001074
Vedant Jain 230008038
Bhuva Vasudha 230002017

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages