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;
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.");
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";
// 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.");