From: Erik R. <eri...@do...> - 2016-05-11 20:50:10
|
>> Assuming that send(), write() and the like complete the requested >> number of bytes is a pretty serious bug. > > For send(), if there is an error on sending, the socket is closed. In no case does it assume a send > worked when it didn’t. Well, it depends on how you look at it. A partial send could certainly be regarded as a failure in this context. Indeed, the consequences of a partial send is probably worse than of a completely failed send, because in the latter case, the client code could just retry sending the message. > I am more and more convinced that closing the socket is simply the right thing to do. Agreed! Erik |