MCPcopy Create free account
hub / github.com/boostorg/beast / echo_op

Method echo_op

example/echo-op/echo_op.cpp:172–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170 DynamicBuffer& buffer_;
171
172 echo_op(
173 AsyncStream& stream,
174 DynamicBuffer& buffer,
175 handler_type&& handler)
176 : base_type(
177 std::move(handler), /*< The `async_base` helper takes ownership of the handler, >*/
178 stream.get_executor()) /*< and also needs to know which executor to use. >*/
179 , stream_(stream)
180 , buffer_(buffer)
181 {
182 // Launch the operation directly from the constructor. We
183 // pass `false` for `cont` to indicate that the calling
184 // thread does not represent a continuation of our
185 // asynchronous control flow.
186 (*this)({}, 0, false);
187 }
188
189 // If a newline is present in the buffer sequence, this function returns
190 // the number of characters from the beginning of the buffer up to the

Callers

nothing calls this directly

Calls 2

moveClass · 0.85
get_executorMethod · 0.45

Tested by

no test coverage detected