K
Kevin
Hi All,
Ive been writting a program that connects to servers then sends a http
request using send and that recieves html code back.
It works most of the time however sometimes the recv command waits a too
long when there is nothing left to recieve.
some of my code is
do{
recvint = recv(sock, recvbuf, 1000, 0);
printf("\necvint %d:\n", recvint);
printf("%s\n", recvbuf);
} while( recvint > 0 );
Is there any way to stop the recv after 5 seconds? It seems to wait until
the socket is closed by the server which means that the program waited all
night because one server doesnt close connections.
If you want any more info let me know.
Thanks
Kevin
Ive been writting a program that connects to servers then sends a http
request using send and that recieves html code back.
It works most of the time however sometimes the recv command waits a too
long when there is nothing left to recieve.
some of my code is
do{
recvint = recv(sock, recvbuf, 1000, 0);
printf("\necvint %d:\n", recvint);
printf("%s\n", recvbuf);
} while( recvint > 0 );
Is there any way to stop the recv after 5 seconds? It seems to wait until
the socket is closed by the server which means that the program waited all
night because one server doesnt close connections.
If you want any more info let me know.
Thanks
Kevin