805 BOOST_REQUIRE(context.
hasSize(1));
808 communication.acceptConnectionAsServer(
"A",
"B",
"", 0, 1);
809 communication.send(message, 0);
810 communication.receive(message, 0);
811 BOOST_TEST(message == 2);
812 communication.closeConnection();
814 BOOST_REQUIRE(context.
isNamed(
"B"));
815 communication.requestConnectionAsClient(
"A",
"B",
"", {0}, 0);
816 communication.receive(message, 0);
817 BOOST_TEST(message == 1);
819 communication.send(message, 0);
820 communication.closeConnection();
829 BOOST_REQUIRE(context.
hasSize(2));
833 communication.acceptConnectionAsServer(
"A",
"B",
"", context.
rank, 2);
835 communication.send(10, 0);
836 communication.receive(message, 0);
837 BOOST_TEST(message == 20);
839 communication.send(20, 1);
840 communication.receive(message, 1);
841 BOOST_TEST(message == 40);
843 communication.closeConnection();
845 communication.acceptConnectionAsServer(
"A",
"B",
"", context.
rank, 0);
846 communication.closeConnection();
849 BOOST_REQUIRE(context.
isNamed(
"B"));
851 communication.requestConnectionAsClient(
"A",
"B",
"", {0}, context.
rank);
853 communication.receive(message, 0);
854 BOOST_TEST(message == 10);
856 communication.send(message, 0);
858 communication.closeConnection();
860 communication.requestConnectionAsClient(
"A",
"B",
"", {0}, context.
rank);
862 communication.receive(message, 0);
863 BOOST_TEST(message == 20);
865 communication.send(message, 0);
867 communication.closeConnection();
878 BOOST_REQUIRE(context.
hasSize(2));
883 communication.acceptConnectionAsServer(
"A",
"B",
"", 0, 2);
885 communication.send(10, 0);
886 communication.receive(message, 0);
887 BOOST_TEST(message == 20);
889 communication.send(100, 1);
890 communication.receive(message, 1);
891 BOOST_TEST(message == 200);
893 communication.closeConnection();
895 communication.acceptConnectionAsServer(
"A",
"B",
"", 1, 2);
897 communication.send(20, 0);
898 communication.receive(message, 0);
899 BOOST_TEST(message == 40);
901 communication.send(200, 1);
902 communication.receive(message, 1);
903 BOOST_TEST(message == 400);
905 communication.closeConnection();
909 BOOST_REQUIRE(context.
isNamed(
"B"));
912 communication.requestConnectionAsClient(
"A",
"B",
"", {0, 1}, 0);
914 communication.receive(message, 0);
915 BOOST_TEST(message == 10);
916 communication.send(20, 0);
918 communication.receive(message, 1);
919 BOOST_TEST(message == 20);
920 communication.send(40, 1);
922 communication.closeConnection();
924 communication.requestConnectionAsClient(
"A",
"B",
"", {0, 1}, 1);
926 communication.receive(message, 0);
927 BOOST_TEST(message == 100);
928 communication.send(200, 0);
930 communication.receive(message, 1);
931 BOOST_TEST(message == 200);
932 communication.send(400, 1);
934 communication.closeConnection();