Swapping sockets for polling