LoadRunner手动编写Socket访问脚本
Action:
?
#include "lrs.h"
Action()
{
??? lrs_create_socket("socket0","TCP","RemoteHost=127.0.0.1:1212",? LrsLastArg);
??? lrs_send("socket0", "buf1", LrsLastArg);
??? lrs_receive("socket0", "buf2", LrsLastArg);
??? lrs_close_socket("socket0");
}
?
data.ws:
?
;WSRData 2 1
send buf1 11
??? "<ab><param1></ab>"
recv buf2 1024
??? "111s"
-1