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

Method testNeedMore

test/beast/http/parser.cpp:290–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288
289 template<class DynamicBuffer>
290 void
291 testNeedMore()
292 {
293 error_code ec;
294 std::size_t used;
295 {
296 DynamicBuffer b;
297 parser_type<true> p;
298 ostream(b) <<
299 "GET / HTTP/1.1\r\n";
300 used = p.put(b.data(), ec);
301 BEAST_EXPECTS(ec == error::need_more, ec.message());
302 b.consume(used);
303 ec = {};
304 ostream(b) <<
305 "User-Agent: test\r\n"
306 "\r\n";
307 used = p.put(b.data(), ec);
308 BEAST_EXPECTS(! ec, ec.message());
309 b.consume(used);
310 BEAST_EXPECT(p.is_done());
311 BEAST_EXPECT(p.is_header_done());
312 }
313 }
314
315 void
316 testGotSome()

Callers

nothing calls this directly

Calls 6

messageMethod · 0.80
putMethod · 0.45
dataMethod · 0.45
consumeMethod · 0.45
is_doneMethod · 0.45
is_header_doneMethod · 0.45

Tested by

no test coverage detected