struct tapi_pat_sender
Overview
Pattern sender settings More…
#include <tapi_rpc_misc.h> struct tapi_pat_sender { // fields const char* gen_func; tarpc_pat_gen_arg gen_arg; const char* snd_wrapper; rpc_ptr snd_wrapper_ctx; iomux_func iomux; tapi_rand_gen size; tapi_rand_gen delay; int duration_sec; unsigned int time2wait; uint64_t total_size; tarpc_bool ignore_err; const char* pollerr_handler; rpc_ptr pollerr_handler_data; uint64_t sent; bool send_failed; tarpc_pat_gen_arg* gen_arg_ptr; uint64_t* sent_ptr; bool* send_failed_ptr; };
Detailed Documentation
Pattern sender settings
Fields
const char* gen_func
Pattern generator function name
tarpc_pat_gen_arg gen_arg
Pattern generator arguments
const char* snd_wrapper
Name of send function wrapper
rpc_ptr snd_wrapper_ctx
RPC pointer to the first argument of send function wrapper
iomux_func iomux
Iomux function to be used
tapi_rand_gen size
Size of the message
tapi_rand_gen delay
Delay between messages
int duration_sec
How long to run (in seconds; if time2wait is positive, the function can finish earlier)
unsigned int time2wait
Maximum time to wait for writability before stopping sending, in milliseconds (if 0
, the function will wait until duration_sec expires)
uint64_t total_size
How many bytes to send before stopping (ignored if 0
). It may send less if duration_sec
expired. Check sent
on return if you need to be sure that all was sent.
tarpc_bool ignore_err
Ignore errors while run
const char* pollerr_handler
Handler to call if POLLERR
event is got. If not set, receiving POLLERR
instead of POLLOUT
will result in error
rpc_ptr pollerr_handler_data
Data to pass to POLLERR
handler as the first argument (as the second argument socket FD is passed)
uint64_t sent
Number of sent bytes
bool send_failed
true
if send() call failed
tarpc_pat_gen_arg* gen_arg_ptr
Pointer to arguments of pattern generator
uint64_t* sent_ptr
Where to save number of sent bytes
bool* send_failed_ptr
Pointer to a variable which will be set to true
if sending fails