Drain excess credit for this link. When a link is in drain mode (see :attr:`drain_mode`), the sender must use all excess credit immediately, and release any excess credit back to the receiver if there are no deliveries available to send. When invoke
(self)
| 1047 | pn_link_set_drain(self._impl, bool(b)) |
| 1048 | |
| 1049 | def drained(self) -> int: |
| 1050 | """ |
| 1051 | Drain excess credit for this link. |
| 1052 | |
| 1053 | When a link is in drain mode (see :attr:`drain_mode`), the |
| 1054 | sender must use all excess credit immediately, and release |
| 1055 | any excess credit back to the receiver if there are no |
| 1056 | deliveries available to send. |
| 1057 | |
| 1058 | When invoked on a sending link that is in drain mode, this |
| 1059 | operation will release all excess credit back to the receiver |
| 1060 | and return the number of credits released back to the sender. |
| 1061 | If the link is not in drain mode, this operation is a noop. |
| 1062 | |
| 1063 | When invoked on a receiving link, this operation will return |
| 1064 | and reset the number of credits the sender has released back |
| 1065 | to the receiver. |
| 1066 | |
| 1067 | :return: The number of credits drained. |
| 1068 | """ |
| 1069 | return pn_link_drained(self._impl) |
| 1070 | |
| 1071 | @property |
| 1072 | def remote_max_message_size(self) -> int: |
no test coverage detected