Socket Transmission Mode
SocketsThere are two main operations: connection-oriented and connectionless. connection-oriented sockets operations are like a phone. They must establish a connection and a person call. the order of all things at arrival is the same as that at their departure. the connectionless sockets operation is like a mail delivery, with no guarantee. The order of arrival of multiple mails may be different from that of departure.
Which mode is mail application used?Program. If reliability is more important, connection-oriented operations will be better. for example, the file server needs the correctness and orderliness of their data. if some data is lost, the system's validity will be lost. some servers, such as sending some data blocks intermittently. if the data is lost, the server does not want to resend it again. because when the data arrives, it may be out of date. to ensure data orderliness and correctness requires additional memory consumption for operations, and additional costs will reduce the system response rate.
Read: http://www.javah.net/wangluobiancheng/20070611/2623.html