Very Simple Web Server Orion Sky Lawlor, olawlor@acm.org, 2005/2/9 INTRODUCTION Here's a complete, functional web server and web client. Both are very bare-bones, and neither does anything useful with the HTTP headers. If you're interested in doing better HTTP processing, visit http://www.w3.org/Protocols/ RUN You run the server like ./webserver It listens on port 8080 by default. You run the web client like ./webclient http://localhost:8080/foo The web client should be able to fetch the first 128 bytes of any ordinary http URL BUILD On a UNIX machine, you should be able to build like: make skt.c and .h are my little network-handling library. There are several alternate versions of "webserver", including one that spawns per-client processes (webserver_fork.c), pthreads (webserver_pthread.c), and pthreads with locks. The source should also build on Windows, but I haven't tried it.