code: def set_handler(self, handler):
          
          set_flag = False
          for protoc in self._handler_table:
              if isinstance(handler, self._handler_table[protoc]["type"]):
                  self._handler_table[protoc]["obj"] = handler
                  return RET_OK
  
          if set_flag is False:
              return RET_ERROR
docs: set the callback processing object to be used by the receiving thread after receiving the data.User should set
          their own callback object setting in order to achieve event driven.
          :param handler:the object in callback handler base
          :return: ret_error or ret_ok