background image
<< Determine the socket | Determining Character Offsets for Parameterization >>
<< Determine the socket | Determining Character Offsets for Parameterization >>

relevant buffer

Creating Vuser Scripts
Chapter 12, page 228
Windows Sockets Vuser Scripts · Developing Windows Sockets Vuser Scripts
In
2
Insert an lrs_save_param function in the Actions section, after the lrs_receive
for the relevant buffer. In this instance, the buffer is
buf79
. Since no buffer
descriptor is specified, it uses the contents of the last received buffer,
buf79
. The
PID is saved to a parameter called
param1
. Print the parameter to the output
using lr_output_message.
3
Replace the value in the appropriate Send buffer with the parameter, enclosed in
angle brackets.
4
Save and run the script.
lrs_receive("socket1", "buf79", LrsLastArg);
lrs_save_param("socket1", NULL, "param1", 60, 5);
lr_output_message ("param1: %s", lr_eval_string("<param1>"));
lr_think_time(10);
lrs_send("socket1", "buf80", LrsLastArg);
send buf80
"kill <param1>"