We are developing a network application on linux using C/S, recently we found that the write/read on some open and connected sockets may fail when there are large amount of UDP and TCP data conveying over the bandwith, it looks like the sockets are closed by some unknown reason.
Here comes the questions, please tell me if the TCP will automatically close the sockets or not.
Suppose that there are a sender and a receiver, the sender sends lots of data to the receiver via a TCP non-blocking socket. And suppose there are a lot traffic on the bandwith by the application itself and other applications. If the bandwith are totally deployed that the sender don't have any chance to send out the data, then will the TCP automatically close the socket in some time later? if yes, how much is the time value?
Suppose that the bandwith in question 1 is not fully deployed, and the sender can deliver data to the receiver successfully. But if the receiver doesn't read the data and in some time later the buffer will fill, then will TCP automatically close the socket in hours?
Any help would be greatly appreciated!!