Queue message for sending If the message is of same type as messages in queue, the message is just added to queue. If the message is of different type as messages in queue, the queue is flushed and then the message is queued. :rtype: generator
(self, msg)
| 130 | pass |
| 131 | |
| 132 | def queueMessage(self, msg): |
| 133 | """ |
| 134 | Queue message for sending |
| 135 | |
| 136 | If the message is of same type as messages in queue, the message is |
| 137 | just added to queue. |
| 138 | |
| 139 | If the message is of different type as messages in queue, the queue is |
| 140 | flushed and then the message is queued. |
| 141 | |
| 142 | :rtype: generator |
| 143 | """ |
| 144 | if self._sendBufferType is None: |
| 145 | self._sendBufferType = msg.contentType |
| 146 | |
| 147 | if msg.contentType == self._sendBufferType: |
| 148 | self._sendBuffer += msg.write() |
| 149 | return |
| 150 | |
| 151 | for res in self.flush(): |
| 152 | yield res |
| 153 | |
| 154 | assert self._sendBufferType is None |
| 155 | self._sendBufferType = msg.contentType |
| 156 | self._sendBuffer += msg.write() |
| 157 | |
| 158 | def queueMessageBlocking(self, msg): |
| 159 | """Blocking variant of :py:meth:`queueMessage`.""" |
no test coverage detected