Is there a way to read the long answer from server not using non-blocking sockets?
The problem is that recv blocks if server stops to send.
while(true){
n=recv(skt, buf, BUFFER_SIZE,0);
if(n<=0)break;
buf[n]='\0';
std::cout<<buf;
}
So, how to break from while(true) before recv() blocks? My experiments with select() failed. =(