51Testing软件测试论坛

标题: 求助!UDP方式发送日志的脚本,LR执行时报10022错误。该怎么改? [打印本页]

作者: wonpen    时间: 2006-5-31 17:47
标题: 求助!UDP方式发送日志的脚本,LR执行时报10022错误。该怎么改?
今天用LR8录制了个脚本,协议是winsocket,功能就是模拟工具往日志服务器发送日志。但执行时报错“Action.c(12): Error : socket0 - Invalid argument. Error code : 10022.”。
报错现象如下:
无论多少Vuser运行,无论设置运行时间多久,都是很快报错结束。日志有时能发出去,有时则不能。
脚本如下:
#include "lrs.h"
Action()
{
    lrs_create_socket("socket0", "UDP", "LocalHost=0",  LrsLastArg);
    lrs_send("socket0", "buf0", "TargetSocket=192.168.101.208:514", LrsLastArg);
    return 0;
}
data.ws文件内容为:
;WSRData 2 1

send  buf0 177
    "begin_time=\"2005-4-9 11:23:10 234\",end_time=\"2003-4-9 11:23:10 999\",service_asker=\"RA\",authn_user=\"ID1\",authn_resource=\"RES01\",authn_action=\"read\",result=\"true\",result_msg=\"msg\""

-1

单个Vusr只跑一次也报这个错误。我自己也没找到问题所在,特来求助。
作者: beiyu95    时间: 2006-6-1 09:17
这是winsock的错误,你给winsock的函数传递了一个无效参数。
Question/Problem: Invalid Argument.

Answer/Solution: An invalid value was given for one of the arguments to a function. For example, the value given for the origin when positioning a file pointer (by means of a call to fseek) is before the beginning of the file.
作者: 笑游天涯侠    时间: 2006-6-1 10:12
可能是send buf中的参数没做关联或参数化造成的。
跟开发人员交流下,问问那些参数所代表的意义,哪些参数在每次执行时是动态变化的。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2