opdenkamp/xbmc — comment on commit b4a1dcac8c9f979a71356d5b2054bdc0d3d111a2
File:  line 0
By EricV:

What not clear for me in case the select timeout occurs on a second read, or a second write inside the while loops assuming you did not read or write all the data first time (is this a real worl use case), what should you return? The error but some bytes have been read or written or simply the number of byte read (reusing the timeout indicates you did got byte within the delay, just not all the expected bytes) or written without errors?