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

Method testAsioHandlerInvoke

test/beast/http/write.cpp:862–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860 };
861
862 void
863 testAsioHandlerInvoke()
864 {
865 using strand = net::strand<
866 net::io_context::executor_type>;
867
868 // make sure things compile, also can set a
869 // breakpoint in asio_handler_invoke to make sure
870 // it is instantiated.
871 {
872 net::io_context ioc;
873 strand s{ioc.get_executor()};
874 test::stream ts{ioc};
875 flat_buffer b;
876 request<empty_body> m;
877 request_serializer<empty_body, fields> sr{m};
878 async_write_some(ts, sr,
879 net::bind_executor(
880 s, copyable_handler{}));
881 }
882 {
883 net::io_context ioc;
884 strand s{ioc.get_executor()};
885 test::stream ts{ioc};
886 flat_buffer b;
887 request<empty_body> m;
888 request_serializer<empty_body, fields> sr{m};
889 async_write(ts, sr,
890 net::bind_executor(
891 s, copyable_handler{}));
892 }
893 {
894 net::io_context ioc;
895 strand s{ioc.get_executor()};
896 test::stream ts{ioc};
897 flat_buffer b;
898 request<empty_body> m;
899 async_write(ts, m,
900 net::bind_executor(
901 s, copyable_handler{}));
902 }
903 }
904
905 struct const_body_writer
906 {

Callers

nothing calls this directly

Calls 3

async_write_someFunction · 0.50
async_writeFunction · 0.50
get_executorMethod · 0.45

Tested by

no test coverage detected