Handles multiple clients and connections