Handles multiple clients.
Added timeout for client connection.