- Code: Select all
string url = "www.reddit.com";
SocketAddress sa(url, 80);
str << "GET /live/sw7bubeycai6hey4ciytwamw3a HTTP/1.1\r\n"
However, any time I do this (regardless of which website I grab the HTML from) the copyToString function takes FOREVER. I'm not sure if it's because I'm using it improperly, or if it's just the nature of the function and there's really nothing I can do about it.
One thing I can rule out for sure is it being an issue with using a slow computer (32GB ram and intel i7 3770k processor is what i'm working with).
On average the function takes about 5-10 minutes until it gets to the next line of code. I realize that if I were to put the function into a separate thread that I could execute other lines of code while it copies the HTML to the string, however I would still have to wait the 5-10 minutes for the data to be ready.
So I guess my question is: Is there anything I can do to speed up the process of copying the HTML data I get into a string? (including solutions not even involving copyToString() )