| 127 | ) mutable |
| 128 | { |
| 129 | reenter (coro) |
| 130 | { |
| 131 | while (repeat_count > 0) |
| 132 | { |
| 133 | --repeat_count; |
| 134 | |
| 135 | delay_timer->expires_after(std::chrono::seconds(1)); |
| 136 | yield delay_timer->async_wait(std::move(self)); |
| 137 | if (error) |
| 138 | break; |
| 139 | |
| 140 | yield boost::asio::async_write(socket, |
| 141 | boost::asio::buffer(*encoded_message), std::move(self)); |
| 142 | if (error) |
| 143 | break; |
| 144 | } |
| 145 | |
| 146 | // Deallocate the encoded message and delay timer before calling the |
| 147 | // user-supplied completion handler. |
| 148 | encoded_message.reset(); |
| 149 | delay_timer.reset(); |
| 150 | |
| 151 | // Call the user-supplied handler with the result of the operation. |
| 152 | self.complete(error); |
| 153 | } |
| 154 | }, |
| 155 | token, socket); |
| 156 | } |
nothing calls this directly
no test coverage detected