Got a question in regards to reciving files from a remote site.
The above code connects to a specific web server and ask for index.html file on the remote site - this works. The data is placed in the char array which is fine, but is this the best way of going about this ? 1024 Bytes is hardly enough to store a html file and I assume making a char buf; also is overkill. Is there a better method of storing the data ?Code:// connect to remote site - ok! char buf; char *msg = "GET / HTTP/1.0 \n\n"; int count = send(socketfd, msg, strlen(msg), 0); count = recv(socketfd, buf, sizeof(buf),0);
Thanks for any input