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

Method testTestStream

test/beast/_experimental/stream.cpp:29–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27{
28public:
29 void
30 testTestStream()
31 {
32 char buf[1] = {};
33 net::mutable_buffer m0;
34 net::mutable_buffer m1(buf, sizeof(buf));
35
36 {
37 net::io_context ioc;
38
39 {
40 test::stream ts(ioc);
41 }
42 {
43 test::stream ts(ioc);
44 ts.close();
45 }
46 {
47 test::stream t1(ioc);
48 auto t2 = connect(t1);
49 }
50 {
51 test::stream t1(ioc);
52 auto t2 = connect(t1);
53 t2.close();
54 }
55 }
56 {
57 // abandon
58 net::io_context ioc;
59 test::stream ts(ioc);
60 ts.async_read_some(m1,
61 [](error_code, std::size_t)
62 {
63 BEAST_FAIL();
64 });
65 }
66 //---
67 {
68 net::io_context ioc;
69 {
70 test::stream ts(ioc);
71 ts.async_read_some(m1,
72 test::fail_handler(
73 net::error::operation_aborted));
74 }
75 test::run(ioc);
76 }
77 {
78 net::io_context ioc;
79 test::stream ts(ioc);
80 ts.async_read_some(m1,
81 test::fail_handler(
82 net::error::operation_aborted));
83 ts.close();
84 test::run(ioc);
85 }
86 {

Callers

nothing calls this directly

Calls 5

fail_handlerFunction · 0.85
runFunction · 0.85
async_read_someMethod · 0.80
connectFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected