I use this code to receive the results of my HTTP request:
It displays all the content, but after it had showed all the content it just hangs. Anything after that doesn't work. I removed unnecessary things but it still doesn't work correctly:Code:int l; char abc[100000]; char p[1024]; while((l=recv(sock,p,1023,0))>0){ cout.write(p,l); p[l] = '\0'; strcpy(abc,p); }
Why?Code:int l; char p[1024]; while((l=recv(sock,p,1023,0))>0){ cout.write(p,l); }