Dear gentleman, i have the an ANSI C code that do the following:
0. open a socket 1. write data to the socket 2. close the writing end of the socket 3. read data from the socket 4. close the read end of the socket The the step number 4 returns an error, why ? Here it is (Only the relevant part of the code ) if (!r) r = apx_connect(s, &sa); if (!r) r = pmp_set(&ap, 1ul, &bp); if (!r) r = pmpsend(s, &ap); if (!r) r = apx_shutdown(s, shut_wr); if (!r) r = pmprecv(&ap, s, &l); if (!r) r = apx_shutdown(s, shut_rd);