If you run TCPClient first, then the purchaser will try to make a TCP reference to a
Question:
If you run TCPClient first, then the purchaser will try to make a TCP reference to a non-existent server process. A TCP connection will not be made.
B) UDPClient doesn't establish a TCP connection with the server. Thus, the whole lot ought to paintings high-quality if you first run UDPClient, then run UDPServer, after which kind a few enter into the keyboard.
C) If you use distinctive port numbers, then the customer will try to establish a TCP reference to the incorrect procedure or a non-existent system. Errors will occur.
Problem 22. See Web-server programming assignment for this chapter for steering.
Problem 23. With the unique line, UDPClient does now not specify a port number when it creates the socket. In this situation, the code we could the underlying working system pick a port quantity.
With the substitute line, when UDPClient is done, a UDP socket is created with port range 5432 . UDPServer needs to understand the purchaser port wide variety in order that it may send packets lower back to the accurate patron socket.
Glancing at UDPServer, we see that the purchaser port variety is not "hard-wired" into the server code; rather, UDPServer determines the patron port quantity with the aid of unraveling the datagram it receives from the customer (using the .GetPort() approach).
Thus UDP server will work with any client port number, including 5432. UDPServer therefore does not want to be modified. Before: Client socket = x (selected with the aid of OS) Server socket = 9876 After: Client socket = 5432 Server socket = 9876
Organizational Behavior Integrating Individuals Groups And Organizations
ISBN: 9780415804646
4th Edition
Authors: Joseph E. Champoux