spocket_tester Class Reference

#include <spocket_tester.h>

Collaboration diagram for spocket_tester:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 spocket_tester (const internet_address &where)
 ~spocket_tester ()
bool connect ()
bool accept ()
bool do_a_send (byte *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)

Detailed Description

Definition at line 47 of file spocket_tester.h.


Constructor & Destructor Documentation

spocket_tester::spocket_tester ( const internet_address where  ) 

Definition at line 49 of file spocket_tester.cpp.

spocket_tester::~spocket_tester (  ) 

Definition at line 58 of file spocket_tester.cpp.

References WHACK().


Member Function Documentation

bool spocket_tester::connect (  ) 

Definition at line 67 of file spocket_tester.cpp.

References spocket::connect(), spocket::NO_CONNECTION, spocket::OKAY, and portable::sleep_ms().

Referenced by main().

bool spocket_tester::accept (  ) 

Definition at line 82 of file spocket_tester.cpp.

References spocket::accept(), LOG, spocket::NO_CONNECTION, spocket::OKAY, and portable::sleep_ms().

Referenced by main().

bool spocket_tester::do_a_send ( byte buffer,
int  size,
testing_statistics stats 
)

Definition at line 101 of file spocket_tester.cpp.

References spocket::await_writable(), testing_statistics::bytes_sent, LOG, MAXIMUM_TRANSFER_WAIT, spocket::NONE_READY, spocket::OKAY, spocket::outcome_name(), spocket::PARTIAL, PAUSE_TIME, spocket::send(), testing_statistics::send_time, and time_stamp::value().

Referenced by perform_test().

bool spocket_tester::do_a_receive ( int  size_expected,
testing_statistics stats 
)

Definition at line 153 of file spocket_tester.cpp.

References spocket::await_readable(), testing_statistics::bytes_received, LOG, MAXIMUM_TRANSFER_WAIT, MAXIMUM_WINSOCK_MTU, spocket::NONE_READY, spocket::OKAY, PAUSE_TIME, spocket::receive(), testing_statistics::receive_time, time_stamp::reset(), SOCK_EWOULDBLOCK, portable::system_error_text(), and time_stamp::value().

Referenced by perform_test().

bool spocket_tester::perform_test ( int  size,
int  count,
testing_statistics stats_to_fill 
)

Definition at line 207 of file spocket_tester.cpp.

References testing_statistics::bytes_received, testing_statistics::bytes_sent, spocket::client(), do_a_receive(), do_a_send(), chaos::inclusive(), LOG, MAXIMUM_WINSOCK_MTU, testing_statistics::receive_time, testing_statistics::round_trip_time, testing_statistics::send_time, testing_statistics::total_runs, and time_stamp::value().

Referenced by main().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 04:31:01 2008 for HOOPLE Libraries by  doxygen 1.5.1