MCPcopy Create free account
hub / github.com/apache/qpid-proton / send

Method send

python/proton/_message.py:493–509  ·  view source on GitHub ↗

Encodes and sends the message content using the specified sender, and, if present, using the specified tag. Upon success, will return the :class:`Delivery` object for the sent message. :param sender: The sender to send the message :param tag: The delivery ta

(self, sender: 'Sender', tag: Optional[str] = None)

Source from the content-addressed store, hash-verified

491 self._post_decode()
492
493 def send(self, sender: 'Sender', tag: Optional[str] = None) -> 'Delivery':
494 """
495 Encodes and sends the message content using the specified sender,
496 and, if present, using the specified tag. Upon success, will
497 return the :class:`Delivery` object for the sent message.
498
499 :param sender: The sender to send the message
500 :param tag: The delivery tag for the sent message
501 :return: The delivery associated with the sent message
502 """
503 dlv = sender.delivery(tag or sender.delivery_tag())
504 encoded = self.encode()
505 sender.stream(encoded)
506 sender.advance()
507 if sender.snd_settle_mode == Link.SND_SETTLED:
508 dlv.settle()
509 return dlv
510
511 @overload
512 def recv(self, link: 'Sender') -> None:

Callers 1

initializeMethod · 0.95

Calls 6

encodeMethod · 0.95
advanceMethod · 0.80
deliveryMethod · 0.45
delivery_tagMethod · 0.45
streamMethod · 0.45
settleMethod · 0.45

Tested by

no test coverage detected