handle multiple requests from a single socket