Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (buf is a char array with the contents of the http data, pLength is a char *)
- pLength = strstr(buf, lenTok);
- //advance pointer past "Content-Length: " to point to data
- if (pLength != NULL)
- pLength = (pLength + 16);
- int length = 0;
- for (int i = 0; i < /*length of Content-Length:*/; i++)
- {
- length = length * 10;
- length = length + (pLength[i] - '0');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement