socket.io polling implementation