X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=octopi%2Flibrary%2Ftests_sockets%2Ftest_spocket.cpp;h=5c761203ba52cc765925585c877bb29f57ea0e3a;hb=0454d07ba73343619386f06fa4de7c9313ea71ac;hp=25881724d7908960b4e64b52179c2455347d9657;hpb=2952ccf47b80174880141a7ecfa122089f349b8d;p=feisty_meow.git diff --git a/octopi/library/tests_sockets/test_spocket.cpp b/octopi/library/tests_sockets/test_spocket.cpp index 25881724..5c761203 100644 --- a/octopi/library/tests_sockets/test_spocket.cpp +++ b/octopi/library/tests_sockets/test_spocket.cpp @@ -107,7 +107,7 @@ int test_spocket::execute() int send_count = 0; const char *DEFAULT_HOST = "127.0.0.1"; - const int DEFAULT_PORT = 12342; + const int DEFAULT_PORT = 12348; const int DEFAULT_SEND_SIZE = 1008; const int DEFAULT_SEND_COUNT = 10; @@ -185,14 +185,15 @@ expected during a cycle."); internet_address to_pass(byte_array(4, ip_address), "", rcv_port); // now, construct our tester object. - spocket_tester tester(to_pass); + spocket_tester *tester = new spocket_tester(to_pass); // choose the appropriate action based on our role. bool outcome; - if (is_client) - outcome = tester.connect(); - else - outcome = tester.accept(_global_argc != 1); + if (is_client) { + outcome = tester->connect(); + } else { + outcome = tester->accept(_global_argc != 1); + } if (!outcome) { const char *action = is_client? "connect" : "accept"; LOG(astring("Failed to ") + action + " on the tester."); @@ -209,8 +210,8 @@ expected during a cycle."); launch_process::RETURN_IMMEDIATELY, kidnum); ASSERT_EQUAL(result, 0, "launching paired process should start successfully"); - // now we try again accepting from our client. - outcome = tester.accept(); + // now we try again accepting from our client side. + outcome = tester->accept(); //hmmm: redundant below. if (!outcome) { const char *action = is_client? "connect" : "accept"; @@ -221,7 +222,7 @@ expected during a cycle."); // so, we're connected. try sending the test packages out. testing_statistics stats; // to be filled by the tester. - outcome = tester.perform_test(send_size, send_count * 2, stats); + outcome = tester->perform_test(send_size, send_count * 2, stats); // multiply send_count since we count each side as one. if (!outcome) { LOG("Failed out of send_data; maybe other side terminated.");