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)
| 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: |
no test coverage detected