The client will create connection and send requests to download file from server. Progress will also be printed.
-
For
server.c
:cd server gcc -o server server.c
-
For
client.c
:cd client gcc -o client client.c
-
Open the directories in different terminals and run the binaries in the respective directories by:
./server
./client
These commands need to be run in client. If any command other than these are given then a messege will be printed.
Usage: get <filename-1> ... <filename-N>
- It will give error if no file is given.
- It can also handle multiple file requests.
Usage: exit
- Connection between the client and server is lost and both the codes exit.