A cross-platform C-based TCP file transfer utility that allows transferring files between networked computers.
Ensure you have the GCC compiler installed.
- Windows: Install MinGW-w64 or MSYS2.
- Linux:
sudo apt install build-essential - macOS:
xcode-select --install
make is used to automate the build process using the provided Makefile.
- Using Chocolatey:
choco install make - Using Winget:
winget install GnuWin32.Make - Using MSYS2:
pacman -S make - Manual: Download from GnuWin32 and add the
binfolder to your System PATH.
sudo apt update
sudo apt install makebrew install makeOpen your terminal in the project directory and run:
make allThis will generate two executables:
server.exe(orserveron Linux/macOS)client.exe(orclienton Linux/macOS)
To clean the build files:
make cleanThe utility is configured to transfer a file named send.txt from the client to the server.
Ensure a file named send.txt exists in the same directory as the client executable.
The server must be running and listening before the client connects.
./serverThe server will listen on 127.0.0.1:8080 by default and save the received data to recv.txt.
In a new terminal window, run:
./clientThe client will connect to the server, send the contents of send.txt, and close the connection.
Currently, the IP address and Port are hardcoded in server.c and client.c:
- IP:
127.0.0.1 - Port:
8080
To transfer files between different machines, update the ip variable in both files with the server's LAN IP address and recompile using make.