CS476/576

Assignment #4

Due Midnight, Wednesday   Nov 16 , 2005


Write a C/Unix/Sockets  program with the following descriptions:

NAME

ftcpudp  - file transfer using tcp and udp

 

SYNOPSIS

ftcpudp   <tcphost>   <udphost>

 

DESCRIPTION

The program create a tcp process at <tcphost> and a udp process at <udphost> and send a file to both processes. The tcp process saves the file under name  ftcpFile and the udp process saves it under name fudpFile.

 

Make sure that program can run from any arbitrary directory and all the processes are terminated when the file is transferred. Do not use any fixed ports in your program, use only any available ports.

 

The file to be transferred is read by the ftcpudp program from the <stdin> , for example:

 

cash % ftcpudp   ra    isis   <   infile

cash % ftcpudp   ra    isis

<line1>

<line2>

….

CTRL-D

 

 

See my own solution under:

/home/cs476/public_html/fall05/assignments/a4/wahab