this looks inverted to me after these changes after a quick look. 0 timeout means no timeout means handle eof like normal eof, and don't return false in IsEOF()