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

Method testGetSetOption

test/beast/websocket/stream.cpp:25–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23{
24public:
25 void
26 testGetSetOption()
27 {
28 net::io_context ioc;
29 stream<test::stream> ws(ioc);
30
31 {
32 ws.set_option(
33 stream_base::decorator(
34 [](request_type&)
35 {
36 }));
37
38 ws.set_option(
39 stream_base::decorator(
40 [](response_type&)
41 {
42 }));
43 }
44
45 {
46 ws.set_option(
47 stream_base::timeout::suggested(
48 role_type::client));
49
50 ws.set_option(
51 stream_base::timeout::suggested(
52 role_type::server));
53
54 ws.set_option({
55 std::chrono::seconds(30),
56 std::chrono::seconds(300),
57 true});
58
59 stream_base::timeout opt;
60 ws.get_option(opt);
61 ws.set_option(opt);
62 }
63 }
64
65 void
66 testOptions()

Callers

nothing calls this directly

Calls 2

set_optionMethod · 0.80
decoratorClass · 0.50

Tested by

no test coverage detected