CSC 145/290 Programming Assignment 2 Due 10/2/2001 The "secret file download protocol" allows a client to download a file from a server. It is implemented using tcp as follows: The server waits for a connection on port 50021 (the normal ftp port is 21) Once a connection socket has been established, a "secret" handshake must take place between server and client: 1. server sends out a one byte value equal to 01010101 (0x55) 2. server waits for an acknowledgement, which should be a one byte value equal to 10101010 3. server, after receiving handshake acknowledgement, waits for a string (0-terminated) indicating the file the client wants to download. The first character of this file name should be 's'. (I can't just let you download any of my files!) 4. if the file exists on the server, the server will send a one byte value equal to 1 to the client; else, the server will send a one byte value equal to 0 and terminate connection; 5. if file exists (after sending the (char) 1), the server opens the local file and sends it to the client in chunks of up to 1024 bytes at a time (much like a file copy program). If you read the file byte by byte, that should work too. 6. Server terminates connection when file is sent. I've written the server. It's running on 147.4.150.248 (port 50021) You are to write the client side of the protocol, and download my sample solution "sfdp_client.c" so you can decide if yours is better. Save the downloaded file as a local file in your directory. (don't call your program by the same name - it'll erase yours!) Your program should take the server ip address as a command-line argument. Your program should also prompt the user for the file name that should be downloaded. You can also download my code for the server "sfdp_server.c", but it involves stuff that you won't be able to understand at this point. Port 50021 is not blocked by Hofstra's firewall. Don't tell anybody.