What if the listener forks off a process for each connection? The forked processes can then wait for the various events of each connection to take place in order, while the listener goes back to listening. (An architecture not wholly dissimmilar to inetd's, if I am not mistaken.)