Demo.P2P.mp4
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.
- Send & Receive Messages: Communicate effortlessly with peers by sending text messages.
- Graceful Disconnect: On exit, notify all connected peers and remove your port from their active peers list for a clean shutdown.

-
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.
- Large File Sharing: Transfer files between peers by splitting them into chunks, enabling support for large file sizes without overwhelming the network.
- Operating System: Windows OS (required for Winsock2 API)
- Compiler: C Compiler (MinGW)
- Dependencies: Winsock2 library (included with the Windows SDK)
- Clone the Repository:
git clone https://github.com/Arihant779/P2P_Chature_Bhature.git
- Compile the Code
gcc -o p2p_chat main.c -lws2_32
- Run the Application:
.\p2p_chat.exe
| Name | Roll Number |
|---|---|
| Arihant Jain | 230001009 |
| Tanishq Godha | 230001074 |
| Vedant Jain | 230008038 |
| Bhuva Vasudha | 230002017 |



