def send_request(self, request):
        logger.debug("send_request - " + str(request))
        assert isinstance(request, Request)
        try:
            host, port = request.destination
        except AttributeError:
            return

        request.timestamp = time.time()
        transaction = Transaction(request=request, timestamp=request.timestamp)
        if transaction.request.type is None:
            transaction.request.type = defines.Types["CON"]

        if transaction.request.mid is None:
            transaction.request.mid = self._current_mid
            self._current_mid += 1 % 65535

        key_mid = hash(str(host) + str(port) + str(request.mid))
        self._transactions[key_mid] = transaction

        key_token = hash(str(host) + str(port) + str(request.token))
        self._transactions_token[key_token] = transaction

        return self._transactions[key_mid]
:type request: Request
dataset/ETHPy150Open Tanganelli/CoAPthon/coapthon/layers/messagelayer.py/MessageLayer.send_request