Atomical
2005.09.12, 08:52 PM
I realize this isn't a game programming question but this is the only networking forum I know of. I'm working with http fetcher. http://http-fetcher.sourceforge.net/
The problem I'm running into is that when I choose to read an image from a website it only displays the first few readable characters. I don't want to clutter up the thread by posting the entire source but the source is available from the website.
Here's a snip of the read() line:
ret = read(sock, pageBuf + bytesRead, contentLength);
if(ret == -1)
{
close(sock);
free(pageBuf);
errorSource = ERRNO;
return -1;
}
bytesRead += ret;
if(ret > 0)
http fetcher does work with standard html. I just don't understand why it isn't reading the image.
The problem I'm running into is that when I choose to read an image from a website it only displays the first few readable characters. I don't want to clutter up the thread by posting the entire source but the source is available from the website.
Here's a snip of the read() line:
ret = read(sock, pageBuf + bytesRead, contentLength);
if(ret == -1)
{
close(sock);
free(pageBuf);
errorSource = ERRNO;
return -1;
}
bytesRead += ret;
if(ret > 0)
http fetcher does work with standard html. I just don't understand why it isn't reading the image.