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

Method testWriteLimit

test/beast/http/serializer.cpp:99–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 };
98
99 void
100 testWriteLimit()
101 {
102 auto const limit = 30;
103 lambda visit;
104 error_code ec;
105 response<string_body> res;
106 res.body().append(1000, '*');
107 serializer<false, string_body> sr{res};
108 sr.limit(limit);
109 for(;;)
110 {
111 sr.next(ec, visit);
112 BEAST_EXPECT(visit.size <= limit);
113 sr.consume(visit.size);
114 if(sr.is_done())
115 break;
116 }
117 }
118
119 void
120 run() override

Callers

nothing calls this directly

Calls 5

bodyMethod · 0.80
limitMethod · 0.80
nextMethod · 0.80
consumeMethod · 0.45
is_doneMethod · 0.45

Tested by

no test coverage detected