Originally Posted By: hixxy
You would have to listen for requests in your on sockread event to check if the client has requested an image and if so, read that file using /bread and then send it over the socket.

You can't just send the contents of the file though, you have to send a header to tell the client what you're sending so that it knows what to do with the data.

Google "HTTP rfc" and swat up on the HTTP protocol.


How would I output this via a socket, everyway I've tried has given me either "Line too long" or "queue would exceed 16384 bytes"