|
|
|
@ -72,7 +72,7 @@ class MessageLayer(object):
|
|
|
|
|
:rtype : Transaction
|
|
|
|
|
:return: the edited transaction
|
|
|
|
|
"""
|
|
|
|
|
logger.debug("receive_request - " + str(request))
|
|
|
|
|
logger.info("receive_request - " + str(request))
|
|
|
|
|
try:
|
|
|
|
|
host, port = request.source
|
|
|
|
|
except AttributeError:
|
|
|
|
@ -101,7 +101,7 @@ class MessageLayer(object):
|
|
|
|
|
:rtype : Transaction
|
|
|
|
|
:return: the transaction to which the response belongs to
|
|
|
|
|
"""
|
|
|
|
|
logger.debug("receive_response - " + str(response))
|
|
|
|
|
logger.info("receive_response - " + str(response))
|
|
|
|
|
try:
|
|
|
|
|
host, port = response.source
|
|
|
|
|
except AttributeError:
|
|
|
|
@ -148,7 +148,7 @@ class MessageLayer(object):
|
|
|
|
|
:rtype : Transaction
|
|
|
|
|
:return: the transaction to which the message belongs to
|
|
|
|
|
"""
|
|
|
|
|
logger.debug("receive_empty - " + str(message))
|
|
|
|
|
logger.info("receive_empty - " + str(message))
|
|
|
|
|
try:
|
|
|
|
|
host, port = message.source
|
|
|
|
|
except AttributeError:
|
|
|
|
@ -201,7 +201,7 @@ class MessageLayer(object):
|
|
|
|
|
:rtype : Transaction
|
|
|
|
|
:return: the created transaction
|
|
|
|
|
"""
|
|
|
|
|
logger.debug("send_request - " + str(request))
|
|
|
|
|
logger.info("send_request - " + str(request))
|
|
|
|
|
assert isinstance(request, Request)
|
|
|
|
|
try:
|
|
|
|
|
host, port = request.destination
|
|
|
|
@ -233,7 +233,7 @@ class MessageLayer(object):
|
|
|
|
|
:rtype : Transaction
|
|
|
|
|
:return: the edited transaction
|
|
|
|
|
"""
|
|
|
|
|
logger.debug("send_response - " + str(transaction.response))
|
|
|
|
|
logger.info("send_response - " + str(transaction.response))
|
|
|
|
|
if transaction.response.type is None:
|
|
|
|
|
if transaction.request.type == defines.Types["CON"] and not transaction.request.acknowledged:
|
|
|
|
|
transaction.response.type = defines.Types["ACK"]
|
|
|
|
@ -268,7 +268,7 @@ class MessageLayer(object):
|
|
|
|
|
:type message: Message
|
|
|
|
|
:param message: the ACK or RST message to send
|
|
|
|
|
"""
|
|
|
|
|
logger.debug("send_empty - " + str(message))
|
|
|
|
|
logger.info("send_empty - " + str(message))
|
|
|
|
|
if transaction is None:
|
|
|
|
|
try:
|
|
|
|
|
host, port = message.destination
|
|
|
|
|