I use the recv function in the loop to get network data, but let me say that I want to stop receiving data in the middle of the loop. I could just break the loop, but that doesn't seem like a very clean way to stop receiving data.
So, is there a way to clear the data reception or just close the loop? These are HTTP GET / POST requests.
Here's a simplified use:
do { nDataLen = recv(mySocket, data, BUFFSIZE, 0); if (nDataLen > 0) {
source share