ForeverCode
Programmer
I'm having a problem recieving data...
Whenever my code goes into a loop to get the data it stops on recv() and waits for more data once all the data has been read. I dont want this to happen. Is there any way to fix the following code so that once all the data has been written the loop exits and i can handle the data?
CString Data;
while(bRead = recv(Sck, Buff, 8192, 0) != 0){
if(bRead < 0) break;
Data += CString(Buff, bRead); //append
Sleep(100);
}
Whenever my code goes into a loop to get the data it stops on recv() and waits for more data once all the data has been read. I dont want this to happen. Is there any way to fix the following code so that once all the data has been written the loop exits and i can handle the data?
CString Data;
while(bRead = recv(Sck, Buff, 8192, 0) != 0){
if(bRead < 0) break;
Data += CString(Buff, bRead); //append
Sleep(100);
}