'The constructor.
:param session:     The tribler session.
:param endpoint:    The endpoint to use.
:param prefix:      The prefix to use.
:param block_size:  Transmission block size.
:param timeout:     Transmission timeout.
:param max_retries: Transmission maximum retries.'

def __init__(self, session, endpoint, prefix, block_size=DEFAULT_BLOCK_SIZE, timeout=DEFAULT_TIMEOUT, max_retries=DEFAULT_RETIES):

    super(TftpHandler, self).__init__()
    self._logger = logging.getLogger(self.__class__.__name__)
    self.session = session
    self._endpoint = endpoint
    self._prefix = prefix
    self._block_size = block_size
    self._timeout = timeout
    self._max_retries = max_retries
    self._timeout_check_interval = 0.5
    self._session_id_dict = {}
    self._session_dict = {}
    self._callback_scheduled = False
    self._callbacks = []
    self._is_running = False
