-
Place the server and client code in any directories you need and open terminal with their respective address.
-
Then complie respective codes in their current directory with gcc -o.
gcc -o server server.c
This will create new exectable file "server" in it's current directory.
gcc -o client client.c
Also this will again create a new exectable "client".
-
Now, First run the "server" exectable file by running "./server" in the terminal.
./server
-
Then now run "client" file by running "./client".
./client
-
Then you can see terminal run by client program like this.
client>
client> get fileName
Use: The file if exists at the server side will be downloaded in the client directory else gives appropriate error.
client> get file1 file2 file3
Use: Multiple files requested will be downloaded in the client directory.
client> exit
Use: connection with the server is closed.