https://github.com/ecopque/socket_transfer
This project implements a simple file transfer system using Python 3.11 and TCP sockets. It allows a client to send messages and files to a server, which receives and stores them in a designated directory.
https://github.com/ecopque/socket_transfer
os python3 socket socket-server sockets-tcp
Last synced: 5 months ago
JSON representation
This project implements a simple file transfer system using Python 3.11 and TCP sockets. It allows a client to send messages and files to a server, which receives and stores them in a designated directory.
- Host: GitHub
- URL: https://github.com/ecopque/socket_transfer
- Owner: ecopque
- Created: 2025-02-05T14:21:27.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-10T19:10:52.000Z (11 months ago)
- Last Synced: 2025-02-23T18:36:53.240Z (11 months ago)
- Topics: os, python3, socket, socket-server, sockets-tcp
- Language: Python
- Homepage: https://linktr.ee/edsoncopque
- Size: 297 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **Socket File Transfer**
This project implements a **simple file transfer system** using **Python 3.11 and TCP sockets**. It allows a client to send messages and files to a server, which receives and stores them in a designated directory.
---
## **Technologies Used**
- **Python 3.11** – The primary programming language.
- **Sockets** – Used for communication between the client and server over TCP.
- **OS Module** – Handles file operations such as saving received files.
---
## **Project Structure**
- socket-file-transfer
- file/ # Directory where received files are stored
- server.py # Server script (receives messages and files)
- client.py # Client script (sends messages and files)
- README.md # Project documentation
- **server.py**:
- Listens for incoming connections on **port 8002**.
- Receives and prints messages sent by the client.
- Receives files and stores them in the **file/** directory.
- Sends confirmation messages to the client.
- **client.py**:
- Connects to the server on **port 8002**.
- Sends a text message to the server.
- Sends a file (`image.png`) to the server.
- Receives confirmation messages from the server.
---
## **Setup and Execution**
### ** Clone the repository**
```bash
git clone https://github.com/your-username/socket-file-transfer.git
cd socket-file-transfer
```