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(), and LOG.
bool spocket_tester::connect | ( | ) |
Definition at line 76 of file spocket_tester.cpp.
References sockets::spocket::connect().
bool spocket_tester::do_a_receive | ( | int | size_expected, |
testing_statistics & | stats | ||
) |
Definition at line 164 of file spocket_tester.cpp.
References LOG, MAXIMUM_TRANSFER_WAIT, MAXIMUM_WINSOCK_MTU, and sockets::spocket::receive().
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, LOG, MAXIMUM_TRANSFER_WAIT, PAUSE_TIME, sockets::spocket::send(), testing_statistics::send_time, and timely::time_stamp::value().
Referenced by 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(), 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().