code: def set_keepalive(self, interval, callback):
          
          self.__keepalive_interval = interval
          self.__keepalive_callback = callback
          self.__keepalive_last = time.time()
docs: Turn on/off the callback keepalive.  If ``interval`` seconds pass with
          no data read from or written to the socket, the callback will be
          executed and the timer will be reset.