Faster way to recognize changes on sockets