We have two files here, client.c
and server.c
, which contain code corresponding to a client and server respectively. When you run the server in a certain directory, and the client in a certain directory, you can download files in the server directory into the client directory.
- First compile and run the server file in a certain directory
gcc -o exec_ser server.c ./exec_ser
- Next, compile and run the Client file.
gcc -o exec_cli Client.c ./exec_cli
- To download files from client, run
client> get <file1> <file2> <file3>...
- To exit
client> exit
- The server will process one client at a time, and will start processes next client only if the current client exits.