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

Method doIncrementalRead

test/doc/http_examples.cpp:249–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247 //--------------------------------------------------------------------------
248
249 void
250 doIncrementalRead()
251 {
252 test::stream ts{ioc_};
253 std::string s(2048, '*');
254 ostream(ts.buffer()) <<
255 "HTTP/1.1 200 OK\r\n"
256 "Content-Length: 2048\r\n"
257 "Server: test\r\n"
258 "\r\n" <<
259 s;
260 error_code ec;
261 flat_buffer b;
262 std::stringstream ss;
263 read_and_print_body<false>(ss, ts, b, ec);
264 if(BEAST_EXPECTS(! ec, ec.message()))
265 BEAST_EXPECT(ss.str() == s);
266 }
267
268 //--------------------------------------------------------------------------
269

Callers

nothing calls this directly

Calls 2

messageMethod · 0.80
strMethod · 0.45

Tested by

no test coverage detected