|
feisty meow concerns codebase 2.140
|
#include <spocket_tester.h>
Public Member Functions | |
| spocket_tester (const sockets::internet_address &where) | |
| ~spocket_tester () | |
| bool | connect () |
| bool | accept (bool wait=true) |
| bool | do_a_send (basis::abyte *buffer, int size, testing_statistics &stats) |
| bool | do_a_receive (int size_expected, testing_statistics &stats) |
| bool | perform_test (int size, int count, testing_statistics &stats_to_fill) |
Definition at line 43 of file spocket_tester.h.
| spocket_tester::spocket_tester | ( | const sockets::internet_address & | where | ) |
Definition at line 58 of file spocket_tester.cpp.
| spocket_tester::~spocket_tester | ( | ) |
Definition at line 67 of file spocket_tester.cpp.
References basis::WHACK().
| bool spocket_tester::accept | ( | bool | wait = true | ) |
Definition at line 91 of file spocket_tester.cpp.
References sockets::spocket::accept(), LOG, sockets::spocket::NO_CONNECTION, sockets::spocket::OKAY, and timely::time_control::sleep_ms().
| bool spocket_tester::connect | ( | ) |
Definition at line 76 of file spocket_tester.cpp.
References sockets::spocket::connect(), sockets::spocket::NO_CONNECTION, sockets::spocket::OKAY, and timely::time_control::sleep_ms().
| bool spocket_tester::do_a_receive | ( | int | size_expected, |
| testing_statistics & | stats | ||
| ) |
Definition at line 164 of file spocket_tester.cpp.
References sockets::spocket::await_readable(), testing_statistics::bytes_received, LOG, MAXIMUM_TRANSFER_WAIT, MAXIMUM_WINSOCK_MTU, sockets::spocket::NONE_READY, sockets::spocket::OKAY, timely::PAUSE_TIME, sockets::spocket::receive(), testing_statistics::receive_time, timely::time_stamp::reset(), SOCK_EWOULDBLOCK, loggers::critical_events::system_error_text(), and timely::time_stamp::value().
Referenced by perform_test().
| bool spocket_tester::do_a_send | ( | basis::abyte * | buffer, |
| int | size, | ||
| testing_statistics & | stats | ||
| ) |
time_control::sleep_ms(PAUSE_TIME);
Definition at line 112 of file spocket_tester.cpp.
References sockets::spocket::await_writable(), testing_statistics::bytes_sent, do_a_send(), LOG, MAXIMUM_TRANSFER_WAIT, sockets::spocket::NONE_READY, sockets::spocket::OKAY, sockets::spocket::outcome_name(), sockets::spocket::PARTIAL, timely::PAUSE_TIME, sockets::spocket::send(), testing_statistics::send_time, and timely::time_stamp::value().
Referenced by do_a_send(), and perform_test().
| bool spocket_tester::perform_test | ( | int | size, |
| int | count, | ||
| testing_statistics & | stats_to_fill | ||
| ) |
Definition at line 217 of file spocket_tester.cpp.
References testing_statistics::bytes_received, testing_statistics::bytes_sent, sockets::spocket::client(), do_a_receive(), do_a_send(), mathematics::chaos::inclusive(), LOG, MAXIMUM_WINSOCK_MTU, randomizer, testing_statistics::receive_time, testing_statistics::round_trip_time, testing_statistics::send_time, testing_statistics::total_runs, and timely::time_stamp::value().