我在用loadrunner录制脚本,然后运行之后,就出现下面的结果,提示错误! 10
/**********************************************************************CreatedbyMercu...
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Fri Apr 20 10:19:40
*********************************************************************/
#include "lrs.h"
Action()
{
int i;
char *ActualBuffer;
int NumberOfBytes;
lrs_create_socket("socket1", "TCP", "LocalHost=5188",LrsLastArg);
for(i=0;i<8;i++){
lr_start_transaction("send");
lr_think_time(11);
lrs_send("socket1", "buf1", "TargetSocket=192.168.1.2:5188",LrsLastArg); //提示错误:socket1套接字未链接,192.168.1.2地址已被使用。
lrs_get_buffer_by_name("buf1", &ActualBuffer, &NumberOfBytes);
lr_output_message("The buffer's size is: %d/n", NumberOfBytes);
lrs_receive("socket1", "buf2", LrsLastArg);
lrs_get_buffer_by_name("buf2", &ActualBuffer, &NumberOfBytes);
lr_output_message("The buffer's size is: %d/n", NumberOfBytes);
lr_end_transaction("send", LR_AUTO);
}
lrs_close_socket("socket1");
return 0;
}
这个错误出在哪啊?帮帮忙了!谢了 展开
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Fri Apr 20 10:19:40
*********************************************************************/
#include "lrs.h"
Action()
{
int i;
char *ActualBuffer;
int NumberOfBytes;
lrs_create_socket("socket1", "TCP", "LocalHost=5188",LrsLastArg);
for(i=0;i<8;i++){
lr_start_transaction("send");
lr_think_time(11);
lrs_send("socket1", "buf1", "TargetSocket=192.168.1.2:5188",LrsLastArg); //提示错误:socket1套接字未链接,192.168.1.2地址已被使用。
lrs_get_buffer_by_name("buf1", &ActualBuffer, &NumberOfBytes);
lr_output_message("The buffer's size is: %d/n", NumberOfBytes);
lrs_receive("socket1", "buf2", LrsLastArg);
lrs_get_buffer_by_name("buf2", &ActualBuffer, &NumberOfBytes);
lr_output_message("The buffer's size is: %d/n", NumberOfBytes);
lr_end_transaction("send", LR_AUTO);
}
lrs_close_socket("socket1");
return 0;
}
这个错误出在哪啊?帮帮忙了!谢了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询