/* read until socket is closed, or there is an error
* closing the socket before all data is read
* results in server throwing away all data which is
* not read
*/
/* read until socket is closed, or there is an error
* closing the socket before all data is read
* results in server throwing away all data which is
* not read
*/