server uses select and handle client termination.