Skip to content

Instantly share code, notes, and snippets.

@silv3rm00n
Created December 22, 2011 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silv3rm00n/1509336 to your computer and use it in GitHub Desktop.
Save silv3rm00n/1509336 to your computer and use it in GitHub Desktop.
//Now receive the response
while( (read_size = recv(sock , buffer , sizeof(buffer) , 0) ) )
{
response = realloc(response , read_size + total_size);
memcpy(response+total_size , buffer , read_size);
total_size += read_size;
}
printf("%s" , response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment