You could connect to the server using a socket and have a lot more control over the incoming events. But that's not an efficient solution to your issue.