Communication Course - Ex3 Description

 

Exercise 2: Building Reliable File Transfer – Part 1

In this C exercise you will implement reliable file transfer between a client and a server (from the client to the server) using TCP (in part 1) and using UDP (in part 2).

Introduction:

This exercise is composed of two parts. In the first part, you will implement a client/server which transfer files from the client to the server using TCP. In the second part, we will implement the same file transfer using UDP.

Synopsis:

For running the server:

    srftp server-port 

For running the client:

               crftp server-port  server-hostname filename-to-transfer

server-port:                 is the port used by the server
server-hostname:        is the host name of the server
filename-to-transfer:   is the name of the file to transfer from the client to the server, it must reside in the same directory as the client was executed from.
    It will be copied to the same directory as the server was executed from with the same name as it had on the client. If such a file already exists on the server then it should be overwritten.

Basic requirements of the server design:

Basic requirements of the client design:

 

Testing Your Program:

Error Handling:

Useful system calls:

socket, bind, connect, listen, accept, send, recv, select, close, inet_addr, htons, ntohs, gethostbyname

What to submit