def _net_read(sock, count, expiration):
 s = ''
 while (count > 0):
  _wait_for_readable(sock, expiration)
  n = sock.recv(count)
  if (n == ''):
   raise EOFError
  count = (count - len(n))
  s = (s + n)
 return s

def _net_read ( sock , count , expiration ) : s = '' while ( count > 0 ) : _wait_for_readable ( sock , expiration ) n = sock . recv ( count ) if ( n == '' ) : raise EOFError count = ( count - len ( n ) ) s = ( s + n ) return s
read the specified number of bytes from sock .