How to end reciving data from client ?
I Wrote this code that listen on port 80
I want to get request from client browser and send response
C++ :
while ( (l = recv(client, buff, 250, 0)) > 0){
buff[l] = '\0';
printf(buff);
}
sprintf_s(buff,"<h1>Hello World</h1>");
send(client, buff, strlen(buff), 0);
closesocket(client);
this while never end... and after the client's browser send request to the server my code stop on recv() function..... it means recv() function never return zero....
What should i do to know that receving data has finished ?