loadrunner socket发送问题(Mismatch)
各位大侠,为什么我的例子会出现Mismatch的错误?Action.c(17): lrs_create_socket(socket0, TCP, ...)
Action.c(20): Socket was successfully created
Action.c(24): lrs_send(socket0, buf0)
Action.c(26): lrs_receive(socket0, buf1)
Action.c(26): Mismatch (expected 2 bytes, 0 bytes actually received)
代码如下:
#include "lrs.h"
vuser_init()
{
lrs_startup(257);
return 0;
}
-------------------------------------------------------
#include "lrs.h"
Action()
{
int handler;
handler = lrs_create_socket("socket0","TCP","RemoteHost=localhost:2090",LrsLastArg);
if (handler == 0)
lr_output_message("Socket was successfully created ");
else
lr_output_message("An error occurred while creating the socket, Error Code: %d", handler);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
return 0;
}
-----------------------------------------------------------------------
;WSRData 2 1
send buf0 2
"12"
recv buf1 2
"23"
-1 自己顶一个:(
页:
[1]