How come select says there is data, but read returns zero?

  The data that causes select to return is the EOF because the other
  side has closed the connection.  This causes read to return zero.  For
  more information see ``2.1 How can I tell when a socket is closed on
  the other end?''
Suggest a Site