MCPcopy Create free account
hub / github.com/boostorg/asio / reenter

Function reenter

example/cpp20/operations/composed_8.cpp:129–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 4

bufferFunction · 0.85
expires_afterMethod · 0.45
resetMethod · 0.45
completeMethod · 0.45

Tested by

no test coverage detected