Homework4-2(due 8_8).

Homework4-2(due 8_8). - another host, and compare with TCP...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1. Install and compile the Java programs TCPClient on one host and TCPServer on another host. a) Suppose you run TCPClient before you run TCPServer. What happens? Why? Answer: If you run TCPClient first, then the client will attempt to make a TCP connection with a non-existent server process. A TCP connection will not be made. b) What happens if you use different port numbers for the client and server sides? Answer: If you use different port numbers, then the client will attempt to establish a TCP connection with the wrong process or a non-existent process. Errors will occur. 2. Install and compile the Java programs UDPClient on one host and UDPServer on
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: another host, and compare with TCP (question1). a) Suppose you run UDPClient before you run UDPServer. What happens? Why? Answer: UDPClient doesn't establish a TCP connection with the server. Thus, everything should work fine if you first run UDPClient, then run UDPServer, and then type some input into the keyboard. b) What happens if you use different port numbers for the client and server sides? Answer: If you use different port numbers, then the client will attempt to establish a TCP connection with the wrong process or a non-existent process. Errors will occur....
View Full Document

Ask a homework question - tutors are online