net_Read API broken by design
net_ReadNonBlock and net_Select APIs do not allow caller to differentiate between end-of-file and input timeout: they used to return zero in both cases. Now they return 0 only in case of EOF, and -1 otherwise with errno set to EAGAIN, but related code is broken (it has always been one way or the other).