A simple terminal-based multithreaded C application that allows two (or more) machine connected to the same local network
to communicate between them to send and receive files over the internet, using the TCP/IP socket paradigm.
This small project has been designed for personal use and it is therefore open to some future improvement.
This project comes with a custom networking safe library. The library contains functions to control efficiently the data
passage over the network, the handling of common socket errors and the definition of custom data structure to organize
the workflow of the socket definition, building and initialization.
You can both download and compile from scratch the source code, or install it with the install script.
Just download the repository, extract the file to a folder and run
foo@bar:~/File-Transfer$ ./install.shAs above, download the repo and run the make into each folder (Client/Server) to generate the executable.
Before compiling, you must specify the path of your Repository, both for the client and the server (they should be different)
within the first 3 lines of code of both the FTClient and FTServer, where the #DEFINE "PATHTODIR" is located. Just change "PATHTODIR" to your favorite directory, build it and run the executable.
Follow this guidelines to begin the file-trasnfer:
if you have already ran the the install script, you can type the commands anywhere from the terminal to start the transfer.
Also, two folder are created into the Home folder: FileDownload & FileUpload
FileDownload is the folder that stores the files download from the server.
FileUpload is the folder where the file that the server should share are put.
Note: you can move this folder anywhere in your filesystem.
To begin, you can type
foo@bar:~$ ftserverto start the server, and
foo@bar:~$ ftclient <Server IP to reach>to start the client. Be sure to put the ip address of the server as the first argument.
Additional Note: Be sure to put something into the FileUpload, otherwise the client won't see anything.
after you run the make and specify the repository folder, both for the client and the server, you only need to start the exectuable:
To start the client
foo@bar:~$ ./FTClient <Server IP to reach>and to start the server
foo@bar:~$ ./FTServer