'Update IOLoop handler with state.'

def _update_handler(self, state):

    if (self.socket is None):
        return
    if (state & self.socket.events):
        self.io_loop.add_callback((lambda : self._handle_events(self.socket, 0)))
