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

Method testIssue300

test/beast/websocket/write.cpp:745–766  ·  view source on GitHub ↗

https://github.com/boostorg/beast/issues/300 Write a message as two individual frames */

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

messageMethod · 0.80
handshakeMethod · 0.45
write_someMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected