CS476/576

Assignment #5

Due Midnight, Wednesday   Dec 7  , 2005


Write a java/swing program with the following descriptions:

NAME

etcpudp  - echo using tcp and udp

 

SYNOPSIS

java   etcpudp  

 

DESCRIPTION

 

 

The program creates a swing graphical interface with the following description:

 

1.   The user can specify two hosts <tcphost> and <udphost> to run the etcp and eudp processes.

2.   A button to start the program.

3.   A button to end the program with cancellation option.

4.   A text line to enter a text to be sent to the etcp and eudp processes.

5.   Two text areas to display the echoed lines sent by the eudp and the etcp  processes.

 

The program creates the etcp process at <tcphost> and the eudp process at <udphost>.  It then sends each line typed by the user to both of these two processes. The etcp and  the eudp processes echoes back and then saves the received lines under files etcpFile and  eudpFile.

 

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