Developing a server receiving multiple sockets

From: Jo (
Date: 09/02/04

Date: 1 Sep 2004 20:07:17 -0700

I've never written a server before, so I don't know much about some of
the basics. The one I'm writing can expect the same volume of sockets
as a web server: any number at anytime. So how do web servers buffer
for a theoretically infinite number of connections requests? Does it
just keep taking connections until it crashes, or does it have some
hard limit?

   Also, how are these multiple sockets managed? Are they piled in
some large link list and read from whenever they receive packets? Or
does a parent do the listening, followed by a fork() when a connection
comes in, wherein the child goes and does all the work while the
parent goes back to listening? Putting it that way, I guess the link
list idea is a pretty poor one, but I really don't know how these
things work, and I'm surprised at the amount of documentation I
haven't been able to find on this.