This project implements a simple File Transfer Protocol (FTP) using socket programming in C++.
It demonstrates file transfer between a server and client on a local network.
- File transfer between client and server using TCP
- Reliable connection and data transmission
- Automatic creation of a new file (
downloaded.txt) after transfer - Error handling for missing or corrupted files
- The server hosts a sample file named
test.txt. - The client connects to the server and requests the file.
- The file data is sent over a TCP socket connection.
- The client saves the received file as
downloaded.txt.
- C++
- Socket Programming
- TCP/IP Networking
- Compile both files:
g++ server.cpp -o server g++ client.cpp -o client
2.first run the server ./server 3.run the client in another terminal ./client The file test.txt from the server will be received and saved as downloaded.txt in the client’s folder.