[ale] listen()

cfowler cfowler at outpostsentinel.com
Mon Feb 10 12:32:21 EST 2003


I'm writing a server that will only accept one connection at a time.  IT
will only service one.  It will then accept a new one after the one
being serviced has terminated.  My questions is that listen(int socket,
int backlog) does not do this for me.  I'm setting backlog to 0 and I've
got clients waiting in the wings to be accept()ed.  But they could be
waiting for an accept() for a very long time.  Depending on when the
first client close()s its connection.  Does anyone know of a solution?

One solution could be to fork() a child that services the first
connection.  The parent then closes() each new incoming connection until
that child has terminated?

Chris



_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list