tags:

views:

400

answers:

1

Hi,

I am aware on how to send files through a socket in perl (server, client)... but I was wondering if anyone could explain or give me a reference on how to send image files through a socket

+1  A: 

If you are "talking to the browser", you probably need to speak HTTP? If so, you need to send the correct Headers (e.g Content-Type: image//jpeg) before sending the raw image data.

Sec
Yes! Had completely overseen this... thanks
Paul
Sounds like you're implementing at least part of an HTTP server. If you haven't already been consulting it, you might find RFC 2616 (the official HTTP spec) helpful: http://www.ietf.org/rfc/rfc2616.txt
Ben Dunlap