By default, when a TCP stream socket is closed, the connection is left intact while TCP tries to deliver any data previously written to the socket, but not yet received. This is known as an orderly release.If an application sends a lot of data over a TCP connection, but encounters an error during some other processing, it might make sense not to bother sending any data queued for transmission. In this case, the application can use the SO_LINGER socket option to generate an abortive release instead. An abortive release, as the name implies, discards any data queued for delivery to the other end of the connection. Write a program that illustrates the difference between abortive and orderly releases with TCP.
What will be an ideal response?
he program shown in Figure 61 sends a large amount of data over aTCP connection. Depending on a command-line argument, the client closes the connection either in an orderly manner or abortive manner.Meanwhile, the server is reading the data and adding up the amount of data it read. When an orderly release is used, the server receives all of the data sent by the client. However,when an abortive release is used, any data not yet read is discarded. The server reads one byte at a time to increase the likelihood that unread data will still be buffered when the client closes its socket, however the results are timing-dependent.
You might also like to view...
Which of the following statements is false?
a. Classes (and their objects) encapsulate, i.e., encase, their attributes and methods. b. A class’s (and its object’s) attributes and methods are intimately related. c. For objects to communicate effectively with one another, each must know how the other object is implemented. d. Information hiding is crucial to good software engineering.
A __________ is one that must meet its deadline, otherwise it will cause unacceptable damage or a fatal error to the system.
A) ?periodic task ? B) ?soft real-time task C) ?hard real-time task ? D) ?aperiodic task
The motherboard represents the logical foundation of the computer
Indicate whether the statement is true or false
The ____________________ Browser is a quick reference to the built-in functions available in MySQL.
Fill in the blank(s) with the appropriate word(s).