| 166 | } |
| 167 | |
| 168 | DataAvailable DestinationBuffer::getAndClearNotify() { |
| 169 | if (notify_ == nullptr) { |
| 170 | BOLT_CHECK_NULL(aliveCheck_); |
| 171 | return DataAvailable(); |
| 172 | } |
| 173 | DataAvailable result; |
| 174 | result.callback = notify_; |
| 175 | result.sequence = notifySequence_; |
| 176 | result.data = getData(notifyMaxBytes_, notifySequence_, nullptr, nullptr); |
| 177 | clearNotify(); |
| 178 | return result; |
| 179 | } |
| 180 | |
| 181 | void DestinationBuffer::clearNotify() { |
| 182 | notify_ = nullptr; |