Saturday, April 21, 2001 10:00 AM
Why would you ever want to to this yourself?
Java source code is available for a plethora
of public-domain HTTP servers, ranging from the
simple (e.g. http://www.acme.com/software/micro_httpd/
to the industrial-strength (e.g. http://www.w3.org/Jigsaw
If you really want to start from scratch, get a copy of the
HTTP specification and read it - that is the only way you
will be able to create a compliant server. The fact that you
are not serving images properly means you are probably
not treating the data as binary, or are responding with the
wrong MIME type in the header. Since you complain about
speed, I'm guessing you're not buffering or using multiple
threads properly. Writing a high-performance, high-volume
server in any language is not a trivial task.