https://github.com/boostorg/beast/issues/300 Write a message as two individual frames */
| 743 | Write a message as two individual frames |
| 744 | */ |
| 745 | void |
| 746 | testIssue300() |
| 747 | { |
| 748 | for(int i = 0; i < 2; ++i ) |
| 749 | { |
| 750 | echo_server es{log, i==1 ? |
| 751 | kind::async : kind::sync}; |
| 752 | net::io_context ioc; |
| 753 | stream<test::stream> ws{ioc}; |
| 754 | ws.next_layer().connect(es.stream()); |
| 755 | |
| 756 | error_code ec; |
| 757 | ws.handshake("localhost", "/", ec); |
| 758 | if(! BEAST_EXPECTS(! ec, ec.message())) |
| 759 | return; |
| 760 | ws.write_some(false, sbuf("u")); |
| 761 | ws.write_some(true, sbuf("v")); |
| 762 | multi_buffer b; |
| 763 | ws.read(b, ec); |
| 764 | BEAST_EXPECTS(! ec, ec.message()); |
| 765 | } |
| 766 | } |
| 767 | |
| 768 | /* |
| 769 | https://github.com/boostorg/beast/issues/1666 |
nothing calls this directly
no test coverage detected